Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix remove button plugin #1

Merged
merged 5 commits into from
Jun 12, 2019

Conversation

Pictor13
Copy link
Member

I duplicate "my pull request on the original repo"(selectize#1311), since in there the proposed changes are not being merged since years and the library behaviour is incoherent in some scenarios when using it inside the honeybee-agavi-cmf-vendor.

Read the info and links inside that pull request comments, in order to have context and insight about details and the motivations for the proposed changes.

The fork on Honeybee allows to integrate the needed patches, being independent from the original repo updating time.
Remember to check here and integrate new eventual commits from there once every while.

- keep the button element inside the 'item' element.
- allows to use a custom CSS class for the remove-button
  element, when settings.mode='single'.
- when removing an item the 'item_remove' event was
  triggered just with setting.mode 'multi' and not with
  setting.mode 'single'.
- the remove-button plugin was splitted in two functions (for 'multi'
  and 'single' mode). This led to divergence in behaviour, fixes, and
  triggered events (856307c).
  This commit unifies the code, congruently with the rest of the
  codebase, making the behaviour again more stable and similar,
  regardless of the mode (single/multi).

- the remove-button plugin, when in 'single' mode, was not able to
  trigger the 'onDelete' callback, preventing from doing checks on
  the values; while that was possible just witht he 'multi' mode.
  Now both modes are able to trigger the callback.
@Pictor13 Pictor13 merged commit 946a1a2 into honeybee:master Jun 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant