-
Hi All, I'm using the navigation module and Tabulator in an app and I'm having a strange issue where the form with the tabulator panel loads correctly when I navigate to it the first time (ie. the tabulator panel is full row width). However, when I navigate away (ie. go to the Home panel) and return to that form, suddenly the Tabulator panel itself is left justified and not full-width, the panel enclosing it however is still full-width. Here is a minimal example clone link that demonstrates the issue. @s-cork was generous enough to point out my obvious miss to get full_width working with the navigation panel in the first place and I hope/suspect I'm missing something painfully obvious again. Any help would be greatly appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Thanks for the minimal example. the |
Beta Was this translation helpful? Give feedback.
Thanks for the minimal example.
This behaviour is because of the way you're setting the default tabulator options
Setting the
Tabulator.default_options
inside the init method isn't the right place for it.These should be defined outside of the class definition.
They're effectively global options and should be set one time.
the
fitDataTable
option does what it says - it fits the table to the data.You only see this on the second load.
It doesn't get applied the first load because the the
Tabulator.default_options
were set after thetabulator
component was created.the second time the page loads the default_options are now set so you're seeing the
tabulator
component with thefitDataTable
l…