Sology / smart_listing

Ruby on Rails data listing gem with built-in sorting, filtering and in-place editing.
http://showcase.sology.eu/smart_listing
MIT License
478 stars 138 forks source link

Configured hidden class and popover_destroy command are not applied correctly #187

Open Katsari opened 4 years ago

Katsari commented 4 years ago

I noticed the new item action does not work when the hidden class in SmartListing initializer is changed.

When clicking the new item button, the configured hidden class should be removed from new-item-placeholder and added to new-item-action but the class that gets applied to new-item-action is still hidden and not the configured one. Also, it is applied to the placeholder but not removed after click.

Something similar happens when the popover_destroy command is modified like this:

  config.constants :bootstrap_commands, {
    popover_destroy: 'dipsose', # Bootstrap 4 requries dipsose instead of destroy
  }

I had to rewrite the showPopover method to use dispose to get it to work.