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 Field Bug: dRep, Governance Action, and Proposal Searches Fail with Trailing Spaces #2472

Open
kneerose opened this issue Dec 5, 2024 · 0 comments
Assignees
Labels
🐛 Bug Something isn't working Other area

Comments

@kneerose
Copy link
Contributor

kneerose commented Dec 5, 2024

Area

Other

Domain

gov.tools

Which wallet were you using?

No response

Context

When searching for dReps, governance actions, or proposals , the search works fine without trailing spaces. However, if spaces are added at the end of the search text (e.g., when pasting copied text with extra spaces), the search fails.

Steps to reproduce

  1. Navigate to the dRep directory page.
  2. Copy any dRep ID or name.
  3. Paste the text into the search bar and add a trailing space.
  4. Observe that the "No DReps Found" message is displayed.

Actual behavior

Without trailing spaces:

  • The relevant dRep, governance action, or proposal card is displayed correctly.
    image
    image
    image

With trailing spaces:

  • The search fails, and a "Not Found" component is displayed.
    image
    image
    image

Expected behavior

  • The dRep, governance action, or proposal card should be displayed regardless of whether the search text has trailing spaces.
    image
    image
    image

Suggested Fix

Add trim() functionality to the search input field to automatically remove any leading or trailing spaces from the search query before processing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working Other area
Projects
Status: No status
Status: No status
Development

No branches or pull requests

4 participants