Closed jonnorstrom closed 8 years ago
Don't even need the event handler. Just adding the gem did the trick.
I checked it out and the old behavior is still there (table displays after filtering and pressing 'reset'). Is it different for you?
Correct, it is different for me. The old behavior isn't there, and every time I click that 'reset' button it does what it should. This is odd. What web client, version, etc. are you using? @andyras
This is under Chrome 52.0.2743.82, and using a fresh install of rails, etc.
I also tested under Safari--in that browser the table always displays.
@andyras try this patch. Make sure to bundle install before you give it a run. I forgot to mention that last time, my mistake. This should work for Chrome, but I can't figure out why it won't work for Safari.
Still the same behavior for me on both browsers. I pulled, bundle install
ed, and restarted the app. Anything else I neglected to try?
Super interesting. You've done all you should. I'll try on my roommates comp, and if I can't get anywhere I'm meeting tomorrow with some more experienced devs and I'll see if they have any ideas.
I just tried again and it works! I'm not sure what I was doing incorrectly before, but at some point I detached HEAD and might not have reattached it in the way I thought I had.
Added gem 'jquery-turbolinks' so that jQuery event handlers work with Turbolinks - for stability. Simply made event handler that adds the 'hidden-table' class back to the table when the 'Reset Button' is clicked.