-
-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems with several x-splade-tables on same page #471
Comments
I still have not found a solution and it is a blocker. Has no one experienced this problem in some other project? |
I had this problem, it doesn't work at all
|
I can confirm this. |
The same problem |
@pascalbaljet any updates on this issue, because this is a show stopper |
I have the same problem |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description:
In my project I have several tables on a single page. When I search or filter, it does not take care of which table I filter for. It just appends some generric parameter to the URL causing ALL tables to execute the command, e.g. edit?sort=name.
If some table does not support sorting by name, it will fail. If all tables support it... all tables will be sorted.
I tried using ->name(...) on the tables but aparently with no effect.
Before Splade, I used protonemedias vue tables: https://github.com/protonemedia/inertiajs-tables-laravel-query-builder
Here I had a section about "Multiple tables per page" where it explained, that I have to set some keys, e.g. InertiaTable::updateQueryBuilderParameters('companies'); for the query builder (some kind of prefix), set the page name: ->paginate(pageName: 'companiesPage') and finally set a name for the table (in controller as well as the vue file): name="companies"
Then, if you searched or sorted, it prepended that name/key so you were able to have n tables on the same page and sorting organization table by name would generate some url parameter with ?organizations.name=whatever etc.
I assumed it is possible but this is also where I finally gave up. Either it is missing or documentation needs to be updated. Thank you for looking into this.
Steps To Reproduce Issue:
Add two tables on same page and try to sort/filter one without sorting the other...
The text was updated successfully, but these errors were encountered: