Skip to content

[feat]: better sort url state handling #1006

@Gemil

Description

@Gemil

Feature description

When advanced filtering is disabled, you handle the filter directly in the use table hook, so there is no need for json encoding/decoding involved and a cleaner looking url with nuqs is generated.
could you also implement this behavior for the sorting, so that no json encode/decode is neccessary?
for example:
current: https://tablecn.com/?status=in-progress&sort=[{%22id%22:%22createdAt%22,%22desc%22:false}]
without json: https://tablecn.com/?status=in-progress&sort=createdAt,asc

also it would be a valid syntax, when the same search parameter is given multiple times:
current: https://tablecn.com/?status=in-progress&sort=[{%22id%22:%22createdAt%22,%22desc%22:false},{%22id%22:%22title%22,%22desc%22:true}]
without json: https://tablecn.com/?status=in-progress&sort=createdAt,asc&sort=title,desc

Additional Context

Additional details here...

Before submitting

  • I've made research efforts and searched the documentation
  • I've searched for existing issues and PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions