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: Ability to pass a custom SearchCategory renderer to the Search component #3630

Closed
PrincessMadMath opened this issue May 29, 2019 · 3 comments
Labels

Comments

@PrincessMadMath
Copy link
Contributor

PrincessMadMath commented May 29, 2019

Feature Request

Problem description

Currently the Search component supports custom renderer for the category name and result items but not for the category layout.

For example, instead of having a two columns layout (with category on the left and results on the right), I would like to be able have a simple list with a header by category:

image

Proposed solution

Search can receive a new prop "categoryLayoutRenderer", which is passed down to SearchCategory. The default value of this props is the current category layout.

The prop categoryLayoutRenderer, is a function that receive the rendered category name and rendered results items.

Exemple:

image

MVP

We opened a PR to show the POC of how it can be done: #3672

@welcome
Copy link

welcome bot commented May 29, 2019

👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you've completed all the fields in the issue template so we can best help.

We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

@PrincessMadMath
Copy link
Contributor Author

Updated the description with a PR for the MVP: #3672

@levithomason
Copy link
Member

Fixed in #3672

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

No branches or pull requests

2 participants