Skip to content
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

Search box reset icon not clearing the search term (server side search) #1455

Open
mbolli opened this issue Jun 20, 2024 · 0 comments
Open

Comments

@mbolli
Copy link

mbolli commented Jun 20, 2024

Describe the bug

When clicking the reset icon in the search box:

  • the searchbox value is reset BUT
  • the search.server.url method is not called

I'm tracking pagination, search and sort in a URLSearchParams object, which is appended to the request url on each request. If the search.server.url method is not called when resetting the search box, the request that is executed is the same as before.

        search: {
            server: {
                url: (prevUrl: string, keyword: string) => {
                    this.query.set('search', keyword);
                    return `${this.config.dataUrl}?${this.query.toString()}`;
                },
            },
        },

To Reproduce
Steps to reproduce the behavior:

  1. Setup server side search
  2. Enter search term -> search.server.url is called with keyword = search term
  3. Reset search term -> search.server.url is not called

Expected behavior
I'd expect the search.server.url method to be called on every search input change/input

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant