I have a table populated by a query and some filters that I apply with textelements. I'd like the values of them to persist beyond page refreshed, so I'm using localStorage.
I thought I'd be able to set the default value of the textelement field named titlefilter to {{ localStorage.values.titlefilter }}
and then have a change event handler run this script on change: localStorage.setValue("titlefilter",titlefilterinput.value)
, however it seems a loop happens where the text field value updates whilst I'm typing in it, partially overwriting mid typing.
What am I doing wrong here?