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

feat(CommandPalette): handle static groups #1458

Merged

Conversation

maximepvrt
Copy link
Contributor

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

The CommandPanel component in Nuxt UI is a powerful tool for managing and displaying search results. However, there are cases where we need to exclude certain groups from being searchable. Currently, there is no built-in feature to accomplish this.

Proposal:
Add a new attribute called "notSearchable" to the group object. When this attribute is set to true, the group will be excluded from the search functionality, and its items will always be displayed regardless of the search query.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@maximepvrt
Copy link
Contributor Author

@benjamincanac I think naming the attribute static would be more appropriate.

I want to use this attribute for 2 types of groups: static groups that are always visible and groups generated by a global query search. Unfortunately, it is currently not possible to have an async search that returns multiple groups, unless I am mistaken.

@benjamincanac benjamincanac changed the title feat(CommandPalette): Add not searchable attribute on group feat(CommandPalette): handle static groups Jul 23, 2024
@benjamincanac
Copy link
Member

@maximepvrt I've made the changes to rename notSearchable to static!

@maximepvrt
Copy link
Contributor Author

Perfect

@benjamincanac benjamincanac merged commit b264ad2 into nuxt:dev Jul 23, 2024
2 checks passed
binhtranhuu pushed a commit to binhtranhuu/nuxt-ui that referenced this pull request Jul 28, 2024
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
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.

2 participants