Mobius1/Selectr

"sync" with original select

Opened this issue · 3 comments

I have a script that changes the selected attributes of the options of the original select. Selectr does not detect this. Is there a way to force Selectr to re-read the selected options from the original select?

Why not change the script to use the Selectr instance and call
mySelectr.setValue('new-value') or mySelectr.setValue('old-value'); // deselect an item ?

Unfortunately, the script that does the changes to the original select is from a third party, and I have no control over it.

if you mean by thirdparty that you load it via cdn or something... fine still you could modify it.
But if you don't want to do that, than store the values in variables an pass it on to the selectr obj.