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

fix: search functionality not working as expected #2587

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Bugbuster2004
Copy link

@Bugbuster2004 Bugbuster2004 commented Dec 4, 2024

Closes #2579

Fixes Issue

fixed the search functionality behaviour

Changes proposed

  1. added a searchOptions function in the database/data.ts . This code is creating a flat array of search options from the sidebarData by combining the subcategory data with its corresponding category
  2. in Searchbar.tsx changed the logic of getFilteredSuggestions as the normalisedQuery was not working as expected

Screenshots

image
this is how the data is being rendered in the sidebar now

Note to reviewers

kindly test the PR at your machine and suggest any changes if required

Copy link

vercel bot commented Dec 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
linkshub ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 10, 2024 5:00am

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Compliance Checks Passed!

@Bugbuster2004 Bugbuster2004 changed the title Issue-2579 Search Functionality Not Working as Expected Issue-2579 fix: Search Functionality Not Working as Expected Dec 4, 2024
@Bugbuster2004 Bugbuster2004 changed the title Issue-2579 fix: Search Functionality Not Working as Expected fix: Search Functionality Not Working as Expected Dec 4, 2024
@Bugbuster2004 Bugbuster2004 changed the title fix: Search Functionality Not Working as Expected Fix: Search Functionality Not Working as Expected Dec 4, 2024
@Bugbuster2004 Bugbuster2004 changed the title Fix: Search Functionality Not Working as Expected fix: search functionality not working as expected Dec 4, 2024
Copy link
Owner

@rupali-codes rupali-codes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @Bugbuster2004, can you please comment out the console.logs ?

@Bugbuster2004
Copy link
Author

hey @rupali-codes did the changes as suggested.

Copy link
Owner

@rupali-codes rupali-codes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Bugbuster2004, looks good!

@Bugbuster2004
Copy link
Author

hey @rupali-codes so what are the next steps?

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

Successfully merging this pull request may close these issues.

[BUG] Search Functionality Not Working as Expected
2 participants