Added updateSelection configuration option to avoid side effects#118
Added updateSelection configuration option to avoid side effects#118toranb wants to merge 1 commit intomiguelcobain:masterfrom
Conversation
|
@toranb So, this is basically DDAU? You're relying on the actions to update your selection, correct? |
|
I suppose it is DDAU :) I think this would be a great addition to your addon as it would enable both older (ember 1.x) style programming along side a more modern (ember 2.x) paradigm |
|
If you think it's a good idea (the concept here) we could extend it to include the same "don't side effect" for add/remove. I realize now that this option should/might need to protect against all side effects/set "selection" code thoughts? |
|
I just updated the PR to include (now) select-item / add-item / remove-item I found our multi-select instances of this are acting funny because addObject is invoked (by selectize), and only after this event will our custom add-item/ or remove-item handler be invoked. This configuration option now prevents any side effect :) |
|
Until this is pulled in I have a fork up on npm for anyone else who might want/or need this feature https://www.npmjs.com/package/ember-cli-selectize-toranb npm install ember-cli-selectize-toranb@0.4.6 |
A great deal of my relationships are rich one-to-many / m2m and require special care when a new item is selected. I've added a simple configuration item to prevent this if that's the desired behavior.
I've also updated the inline hbs compiler so we can write integration tests against this :)