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

[ENHANCEMENT] Preventing reload of the data when clicked in search icon when no search query is typed #1237

Open
Jynx2004 opened this issue Mar 4, 2025 · 4 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@Jynx2004
Copy link

Jynx2004 commented Mar 4, 2025

Is your feature request related to a problem? Please describe.
When I click on the search icon to search for any feature without typing any search query , then the feature data reloads unnecessarily. For a moment of time the dropdown also gets displyed on clicking the search icon, which doesnt looks good.

Describe the solution you'd like
Prevent the unnecessary reload of the features data.

@Jynx2004 Jynx2004 added the enhancement New feature or request label Mar 4, 2025
@past past added the good first issue Good for newcomers label Mar 5, 2025
@mukulpythondev
Copy link

mukulpythondev commented Mar 6, 2025

@past @jcscottiii Hi Mentor and fellow contributors , I am Mukul Rana experience with Full stack development and i am excited to work this issue and started working on it.
Raise the PR soon

@suprith-hub
Copy link

suprith-hub commented Mar 6, 2025

Hey, @Jynx2004 @jcscottiii is clicking on search icon supposed to bring user to 1st page ?
If this feature is to be retained, then search icon should be disabled when user is on 1st page only. Right?

@jcscottiii
Copy link
Collaborator

Hi all,

Thank you for your interest in this feature.

There are a few things going on because we use gotoFilterQueryString() in multiple places:

  1. Current behavior The search button is currently always enabled. Desired behavior The search button should be disabled if there the current submitted value is the same as the "changed" value. We do a similar thing in the date picker by detecting if the date has changed.
  2. Current behavior If a user clicks the enter button, it goes to sets window.location.href regardless if the current href is the same. Desired behavior We should compare the new url with the existing url and we should also make this file use navigateToUrl. And do the comparison inside of there so all navigation events get this benefit.

@Jynx2004
Copy link
Author

Jynx2004 commented Mar 7, 2025

Hi all,

Thank you for your interest in this feature.

There are a few things going on because we use gotoFilterQueryString() in multiple places:

  1. Current behavior The search button is currently always enabled. Desired behavior The search button should be disabled if there the current submitted value is the same as the "changed" value. We do a similar thing in the date picker by detecting if the date has changed.
  2. Current behavior If a user clicks the enter button, it goes to sets window.location.href regardless if the current href is the same. Desired behavior We should compare the new url with the existing url and we should also make this file use navigateToUrl. And do the comparison inside of there so all navigation events get this benefit.

This seems to be a more generalized solution . Will start working on it .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
Status: No status
Development

No branches or pull requests

5 participants