-
Notifications
You must be signed in to change notification settings - Fork 614
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(app-aco): support reference field in advanced search filter #3783
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
leopuleo
changed the title
feat(app-aco): support reference field in advanced search filter
wip: feat(app-aco): support reference field in advanced search filter
Dec 27, 2023
…r-ref-field' into leo/feat/advanced-filters-manager-ref-field
…r-ref-field' into leo/feat/advanced-filters-manager-ref-field
leopuleo
changed the title
wip: feat(app-aco): support reference field in advanced search filter
feat(app-aco): support reference field in advanced search filter
Feb 27, 2024
…r-ref-field' into leo/feat/advanced-filters-manager-ref-field
Pavel910
requested changes
Mar 15, 2024
packages/app-aco/src/components/AdvancedSearch/QueryBuilderDrawer/QueryBuilderDrawer.tsx
Outdated
Show resolved
Hide resolved
...-cms/src/admin/components/ContentEntries/Filters/RefFieldRenderer/components/RefPresenter.ts
Show resolved
Hide resolved
...rc/admin/components/ContentEntries/Filters/RefFieldRenderer/domain/EntryRepositoryFactory.ts
Outdated
Show resolved
Hide resolved
Pavel910
approved these changes
Mar 18, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! 👍
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
With this PR, we add support to
reference
fields inside the Advanced Search Filter.The user can pick the referenced entry via the
Autocomplete
input field and search through the models set during the entry configuration.For the value picked, we save both the
entryId
and themodelId
: both are needed to create the filter query and get the saved entry while loading the reference field.Refactor: field renderer definition via react properties
To support app-specific field renderers, such as the reference field, we introduce the new
<AdvancedSearch.FieldRenderer>
config, allowing us to define field renderers outside ofapp-aco
.name
: arbitrary name used to target the configtype
:FieldType
s used by the elementelement
: the element that will be renderedTogether with the config, the developer will have at his disposal:
useInputField
to access the current input field data (no external props passed to the renderer element)FieldType
enumHow Has This Been Tested?
Manually + Jest