Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…97193) * 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 Co-authored-by: Constance <constancecchen@users.noreply.github.com>
- Loading branch information