Closed dboling19 closed 9 months ago
Could you clarify "parameters are still the default"?
When selecting the links to sort or change page, the parameter names in the URL are whatever is set in knp_paginator.yaml, hence the "default". I would expect these parameters to change to whatever I defined in the controller. This works fine for "pageParameterName", but none of the others which are defined in the documentation.
I'm sorry but I'm not able to reproduce the problem. Moreover, this is the repository for the library: if you can provide a reproducer, please open an issue on the bundle repository. Thanks
I'm not sure how to "provide a reproducer". I provided my code above, it's not working as the documentation claims.
I'm using the component's documentation, as this is not covered in the bundle's documentation. I figured it's here and not there due to a granularity thing. https://github.com/KnpLabs/knp-components/blob/master/docs/pager/config.md
'pageParamterName' is working fine on all uses. Only the sortable seems broken.
A reproducer is a minimal running project where the issue is programmatically reprosuceable. Minimal assumptions about the environment (so, ideally, a project running inside a docker instance)
| Bundle version | 5.9.0 | Components version | 3.6.0 | Symfony version | 6.4.2 | PHP version | 8.3.2
I have several pagination objects on a single page, so I want to change the respectve parameters names for sorting and paging so they don't conflict. Paging works by using "pageParameterName" (see code below for more details), however using the documented "sortFieldParameterName" and "SortDirectionParameterName" change nothing. The parameters are still the default, which I do not want changed in other parts of the application, only in this function.
Location table function, which calls the inital page for the table, where Twig embeds the item table below.
Item Table Fragment. Is called using Twig controller embedding.
In my mind, each table page parameter should have the respective name, which is working. The sort parameters should change as well, in the exact same way, however, they are not. What am I missing?