column-sortable icon indicating copy to clipboard operation
column-sortable copied to clipboard

Update SortableLink.php

Open seche opened this issue 6 years ago • 4 comments

Fixes #144 Updated Query String to override properly the given Get variables rather than ignoring them.

seche avatar Feb 24 '20 22:02 seche

I fear that this will fix the issue you have but it may break the package use for others 😢 .

Kyslik avatar Mar 25 '21 13:03 Kyslik

you could add a config setting @seche - this way we can avoid this behaviour by default (users who don't have the updated config - null) and then if true you can swap the order of the params

it would be nice if you could actually document or explain in more detail what this PR does and why its needed, or why someone would want to swap the params

robbielove avatar Feb 08 '22 10:02 robbielove

@Kyslik How can it break anything? Its just setting the order of which a value is set. And like I described in #144 as it stands, @sortablelink() it ignores all values that you give it if they are already set. So anyone who would have set a value that exist would be in the same boat as myself where it doesn't work, and otherwise the values get merged as it is already.

@robbielove All the details are in #144 I could set a config setting but this seems more of a error fix than a feature. But in the end it's the only way to have multiple sortable tables with links on the same page.

From PHP DOC: Array Merge ... If the input arrays have the same string keys, then the later value for that key will overwrite the previous one. ...

seche avatar May 30 '22 19:05 seche

This PR has been open for 2 years and others are also starting to need this functionality.

I would suggest that we merge my PR (#194 ) which preserves the existing functionality; which should satisfy the fears of @Kyslik and allows the functionality that @seche and others such as myself and those on #200 desire by changing a simple config value.

Can we all agree that this is a good enough compromise to unblock these PR's?

robbielove avatar Jul 06 '22 12:07 robbielove