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(content-manager): search relations with contains not startsWith #19043

Merged

Conversation

Arshiash80
Copy link
Contributor

What does it do?

This PR addresses and fixes two specific issues: #17391 and #18257. The main focus is on resolving the problem related to searching within a relational input.
The changes include using "none" for autocomplete and updating the filter logic to _filter: '$containsi'
Additionally, it enhances the functionality by passing the textValue to the onSearch function in the handleMenuOpen handler, ensuring proper search results when the menu is opened with typing.

Why is it needed?

The issues #17391 and #18257 highlighted a problem with searching in a relational input. This PR aims to solve this issue by making necessary changes and further improves the user experience by passing the text value to the onSearch function.

How to test it?

To verify the behavior of this fix, follow these steps:

  1. Set up the environment with the changes from this PR.
  2. Navigate to the relational input that was problematic (context of the mentioned issues).
  3. Perform a search operation and observe the behavior.
  4. Confirm that the autocomplete on the combobox now uses "none," the filter logic is changed to "_filter: '$containsi'," and proper search results are displayed when the menu is opened with typing.

Related issue(s)/PR(s)

This PR is related to the following issues:

Note to Reviewer @joshuaellis :

  • This PR is based on the develop branch.
  • The title now provides a clear description of the changes made.
  • This PR addresses the menu open when typing issue mentioned in your previous comment ("the TLDR; is the filter list is not being updated correctly"). The changes made aim to resolve this issue, and I appreciate your patience in reviewing these updates.

@joshuaellis joshuaellis self-requested a review December 13, 2023 12:25
@joshuaellis joshuaellis self-assigned this Dec 13, 2023
@joshuaellis joshuaellis added source: core:admin Source is core/admin package pr: fix This PR is fixing a bug labels Dec 13, 2023
@joshuaellis
Copy link
Member

Your changes have broken front end tests, please can you fix them?

@Arshiash80
Copy link
Contributor Author

@joshuaellis I've sorted out the front-end test issues in commit 7bc8ccc. Take a look, and feel free to let me know if there's anything else needed 👍

@Arshiash80
Copy link
Contributor Author

Arshiash80 commented Dec 14, 2023

Hi @joshuaellis 👋
Wondering if you had a moment to check out my PR. Any fixes needed?

@joshuaellis
Copy link
Member

I need to find time again to re-test manually – this will be done when it's done. To set an expectation, this won't be released most likely till next year as well.

@joshuaellis joshuaellis changed the title Fix(content-manager): Improved and fixed relational input field search fix(content-manager): search relations with contains not startsWith Dec 15, 2023
Copy link
Member

@joshuaellis joshuaellis left a comment

Choose a reason for hiding this comment

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

Nice fix, QA'd and just updated the title so it's even clearer.

@joshuaellis joshuaellis merged commit aa7dc3d into strapi:develop Dec 15, 2023
24 checks passed
@Arshiash80
Copy link
Contributor Author

Nice fix, QA'd and just updated the title so it's even clearer.

Thanks! Appreciate the feedback and the title update. 👍

@derrickmehaffy derrickmehaffy modified the milestone: 4.15.6 Dec 15, 2023
joshuaellis added a commit that referenced this pull request Dec 15, 2023
actual PR – #19043

Co-Authored-By: Arshia <arshia.shahidi@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: fix This PR is fixing a bug source: core:admin Source is core/admin package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

search in relation fields does not work properly Relation filed search not working as before + wrong layout
3 participants