forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[App Search] Refactor out a shared MultiInputRows component (elastic#…
…96881) * Add new reusable MultiInputRows component - basically the CurationQuery component, but with a generic values var & allows passing in custom text for every string * Update CurationQueries with MultiInputRows * Update MultiInputRows to support on change behavior - for upcoming Relevance Tuning usage * Update Relevance Tuning value boost form to use new component - relevance_tuning_form.test.tsx fix: was getting test errors with mount(), so I switched to shallow() * Change submitOnChange to onChange fn - more flexible - allows for either an onSubmit or onChange, or even potentially both * Convert MultiInputRowsLogic to keyed Kea logic - so that we can have multiple instances on the same page - primarily the value boosts use case * Update LogicMounter helper & tests to handle keyed logic w/ props * [Misc] LogicMounter helper - fix typing, perf - Use Kea's types instead of trying to rewrite my own LogicFile - Add an early return for tests that pass `{}` to values as well for performance * PR feedback: Change values prop to initialValues + bonus - add a fallback for initially empty components + add a test to check that the logic was mounted correctly * PR feedback: Remove useRef/on mount onChange catch for now - We don't currently need the extra catch for any live components, and it's confusing
- Loading branch information
1 parent
5ba7fc1
commit 57989a6
Showing
28 changed files
with
559 additions
and
683 deletions.
There are no files selected for viewing
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
102 changes: 0 additions & 102 deletions
102
...ons/app_search/components/curations/components/curation_queries/curation_queries.test.tsx
This file was deleted.
Oops, something went wrong.
72 changes: 0 additions & 72 deletions
72
...ications/app_search/components/curations/components/curation_queries/curation_queries.tsx
This file was deleted.
Oops, something went wrong.
94 changes: 0 additions & 94 deletions
94
...pp_search/components/curations/components/curation_queries/curation_queries_logic.test.ts
This file was deleted.
Oops, something went wrong.
53 changes: 0 additions & 53 deletions
53
...ons/app_search/components/curations/components/curation_queries/curation_queries_logic.ts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.