Open jsignell opened 5 years ago
you can add target.properties.options.change.emit()
to make it works in javascript
sort.jslink(multi, code={'clicks': """
source.label = source.clicks % 2 ? '▼' : '▲';
target.options = source.clicks % 2 ? target.options.sort() : target.options.reverse();
console.log(target.options[0]);
console.log(source.clicks);
target.properties.options.change.emit()
"""})
I am trying to set up a new composite widget consisting of a MultiSelect with a sort button and a filter input at the top. I was hoping that it would be able to work in js, but that doesn't quite seem to be the case.
This seems to work fairly well except for the options don't update.
For comparison, here is the same widget implemented with python linking