From 13739a0cec24921f10e7139219162ba723dbf9b6 Mon Sep 17 00:00:00 2001 From: Hugo Marcellin Date: Fri, 31 Jan 2025 11:00:41 +0100 Subject: [PATCH] Expose DirectoryItemSelector key in DirectoryItemsInput props to be able to reset the selector state --- src/components/inputs/reactHookForm/DirectoryItemsInput.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/inputs/reactHookForm/DirectoryItemsInput.tsx b/src/components/inputs/reactHookForm/DirectoryItemsInput.tsx index 8054678f..1b6f45e8 100644 --- a/src/components/inputs/reactHookForm/DirectoryItemsInput.tsx +++ b/src/components/inputs/reactHookForm/DirectoryItemsInput.tsx @@ -67,6 +67,7 @@ export interface DirectoryItemsInputProps { onChange?: (e: any) => void; disable?: boolean; labelRequiredFromContext?: boolean; + itemSelectorKey?: string; } export function DirectoryItemsInput({ @@ -81,6 +82,7 @@ export function DirectoryItemsInput({ onChange, disable = false, labelRequiredFromContext = true, + itemSelectorKey = 'defaultKey', }: DirectoryItemsInputProps) { const { snackError } = useSnackMessage(); const intl = useIntl(); @@ -221,6 +223,7 @@ export function DirectoryItemsInput({ {!hideErrorMessage && }