Refactor RecordSingleSelect and RecordMultiSelect to be synchronous (#10469)
## Context We are experiencing a lot of re-rendering / flash on MultiRecordSelect / SingleRecordSelect / RelationPicker. This PR is a first step to refactor this components ## Scope Only move files to uniformize and prepare for the upcoming refactoring ## Vision - SingleRecordPicker - MultipleRecordPicker - sharing RecordPicker tooling (RecordPickerComponentInstanceContext, searchState) Used in other areas: - RelationPicker (which is actually only a subcomponent of RelationToOneFieldInput) - RelationFromManyFieldInput - WorkflowRelationFieldInput - etc. + remove all effects + migrate to the latest APIs + make a pass on re-renders to remove them completely (we likely need to use a bit more familyStates here)
This commit is contained in:
@ -3,7 +3,7 @@ import { SelectInput as SelectBaseInput } from '@/ui/input/components/SelectInpu
|
||||
import { SelectableList } from '@/ui/layout/selectable-list/components/SelectableList';
|
||||
|
||||
type SelectInputProps = {
|
||||
selectableListId: string;
|
||||
selectableListComponentInstanceId: string;
|
||||
selectableItemIdArray: string[];
|
||||
hotkeyScope: string;
|
||||
onEnter: (itemId: string) => void;
|
||||
@ -17,7 +17,7 @@ type SelectInputProps = {
|
||||
};
|
||||
|
||||
export const SelectInput = ({
|
||||
selectableListId,
|
||||
selectableListComponentInstanceId,
|
||||
selectableItemIdArray,
|
||||
hotkeyScope,
|
||||
onEnter,
|
||||
@ -31,7 +31,7 @@ export const SelectInput = ({
|
||||
}: SelectInputProps) => {
|
||||
return (
|
||||
<SelectableList
|
||||
selectableListId={selectableListId}
|
||||
selectableListId={selectableListComponentInstanceId}
|
||||
selectableItemIdArray={selectableItemIdArray}
|
||||
hotkeyScope={hotkeyScope}
|
||||
onEnter={onEnter}
|
||||
|
||||
Reference in New Issue
Block a user