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

[Multiple Datasource] Filter data source options more dynamically using the data source filter for the data source selector #6174

Closed
Tracked by #5872
BionIT opened this issue Mar 18, 2024 · 0 comments · Fixed by #6175
Assignees
Labels
enhancement New feature or request multiple datasource multiple datasource project v2.14.0

Comments

@BionIT
Copy link
Collaborator

BionIT commented Mar 18, 2024

Is your feature request related to a problem? Please describe.
In #5992, we exposed filter function to allow consumers of the component to specify a filter function which would hide certain data sources before rendering. This function works at initial load but doesn't work dynamically when the filter condition changes.

Describe the solution you'd like
Based on requirement for Search Relevance plugin which consumes this component, we need to be able to filter out options based on options passed by parent filter component more dynamically, thus, to resolve, we should store all data sources fetched during initial load, then apply the filter before rendering so that it can filter based on changes in the filter function.

Describe alternatives you've considered
An alternative is to expose another prop to only render options passed into the component, then the current component would have more complex logic and it doesn't work well with the existing filter function

Another alternative is to make another component which only renders options passed into it
Additional context

Add any other context or screenshots about the feature request here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request multiple datasource multiple datasource project v2.14.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant