ember-cli-selectize
ember-cli-selectize copied to clipboard
using drag and drop plugin doesn't update selection order
Did I miss some configurations or is this a bug or intended to work like this?
If you use ember-selectize with the drag_drop
plugin enabled and change the order of selection it won't update the selection property accordingly.
You mean it won't change the order in the selection
array?
It's neither a bug or a question of configuration, it's just something that isn't implemented. It could be useful.
Can you point me to the part which needs to be changed? Couldn't find a proper place to handle it.
Is it best to subscribe to the selectize change
event and update the selection accordingly? I could try to prepare a PR
@mszoernyi Looking through selectize docs. It looks like we need to include jQuery UI for that.
Probably you could have a better luck extending selectize in our own app, and handle events accordingly. Like:
// my-app/components/ember-selectize.js
import EmberSelectizeComponent from 'ember-cli-selectize/components/ember-selectize';
export default EmberSelectizeComponent.extend({
// body
});
Now, whenever you do
{{ember-selectize}}
It's your overriden component that will be used instead. In principle one would try to catch whatever selectize event a drag n drop triggers and change the selection array accordingly.
Thanks @miguelcobain, I will extend the component first and maybe I figure our how to add this.