metaminded / tabulatr2

A very JS enhanced Tabulatr edition. Rails4, Ruby 2 required
Other
21 stars 10 forks source link

Doesn't play nicely with turbolinks 5 #48

Open mlt opened 7 years ago

mlt commented 7 years ago

A table renders empty upon following a link to a page with tabulatr2 within an application bundled with turbolinks 5. Subsequent page reload results in table entries showing up. Everything works as expected with turbolinks 2.5.3

P.S. I'm on rails 4.2.7. P.P.S. Also filtering JS seems to be messed up with turbolinks 5. Filter pane pops up and hides, comboboxes don't work.

mlt commented 7 years ago

I wonder if _events.js shall be augmented with turbolinks:load or something (didn't try it yet).

mlt commented 7 years ago

FYI: This workaround helped with tabulatr2 as well.

mlt commented 7 years ago

Perhaps a better approach would be to use event delegation as mentioned in Turbolinks docs (last paragraph in linked section).

Crunch09 commented 7 years ago

Hi @mlt , sorry for the long wait, maybe @no-dashes could shed some light on what the plans for tabulatr2 regarding turbolinks support are?

mlt commented 7 years ago

We, probably, want to prevent event propagation on filter tab expansion with return false or something. Otherwise it (turbolinks?) reloads the page and tab collapses.

hanspolo commented 5 years ago

Hi, I'm currently refactoring the JS parts. I will use your changes to support turbolinks after I'm done.

mlt commented 5 years ago

Nice! Let me know so I can rebase or something. Also I didn't test continuous scrolling :( It should also use event bubbling instead of binding for TL to work.

Can we have a gitter.im channel for tabulatr or something?

Also take a look at my fork. I ditched phantomjs in favor of selenium so modern JS can be tested since you are refactoring that.