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 nested with collection filtering #463

Merged
merged 3 commits into from May 3, 2023

Conversation

difernandez
Copy link
Contributor

Motivation / Background

This Pull Request has been created because when we replaced select 2 with slim select, a small functionality went missing: in the nested_select, using the collection option in a level that has a parent should only include elements that belong to the selected parent when searching

Detail

This Pull Request restores that functionality, and adds a test for it. It does so by adding to every option the id of it's parent in an attribute with the same name as the parent, and then in the js it checks for options that match the parentId of the select.

Additional information

Video of the fix working

Screen.Recording.2023-04-24.at.09.27.44.mov

Checklist

Before submitting the PR make sure the following are checked:

  • This Pull Request is related to one change. Changes that are unrelated should be opened in separate PRs.
  • Commit message has a concise description of what changed and why.
  • Tests are added or updated if you fix a bug or add a feature.
  • Documentation has been added or updated if you add a feature or modify an existing one.
  • CHANGELOG files are updated for the changed libraries if there is a behavior change or additional feature (under the "Unreleased" heading if this is not a version change).
  • My changes don't introduce any linter rule violations.

@difernandez difernandez requested a review from gmq April 24, 2023 13:31
@difernandez difernandez force-pushed the fix-nested-with-collection-filtering branch from 552d1fb to 3b3d031 Compare April 24, 2023 16:28
@difernandez difernandez merged commit f629a91 into master May 3, 2023
1 check passed
@difernandez difernandez deleted the fix-nested-with-collection-filtering branch May 3, 2023 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants