Replies: 3 comments 4 replies
-
Hey @dbu. Currently, the URL is modified by the data-table-bundle/src/Type/DataTableType.php Lines 399 to 437 in 6d02efb Theoretically, you could use this logic to achieve your goal, but I'm open for better ideas on how to "load" the data table state into URL. The current implementation is kinda... buggy, because (I think) we cannot accurately convert Symfony's form into array of parameters and it breaks on some fields (e.g. #213). |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Thank you both, that makes sense. Currently, if state controller detected the Turbo, it was pushing the URL to its history, instead of replacing it: if (typeof Turbo !== 'undefined' && null !== Turbo) {
Turbo.navigator.history.push(url); // should be "replace" instead of "push"
} Should be all working fine in 0.31.2! If you're not using asset mapper, remember to reinstall and rebuild the assets, as the change was in the bundle's |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
when linking to a data-table view, the url generated by symfony does not contain the default options. when the page is loaded, the URL is immediately replaced with the default options. the issue with that is that this change is added to the browser history, which means i need to go back twice if i want to use browser navigation to return. my workaround is to generate the url with all default options, but that is cumbersome.
it would be nice to either have "something" in this bundle that generates me the default url directly. or it would imho make sense to not add the change to add default parameters into the browser history.
Beta Was this translation helpful? Give feedback.
All reactions