diff --git a/web/src/components/features/modal/NewTermModal/NewTermModal.tsx b/web/src/components/features/modal/NewTermModal/NewTermModal.tsx index b5e845a86..5e3347a55 100644 --- a/web/src/components/features/modal/NewTermModal/NewTermModal.tsx +++ b/web/src/components/features/modal/NewTermModal/NewTermModal.tsx @@ -116,7 +116,7 @@ const DatasetListContainer: React.FC<{ selectedDatasets: string[]; setSelectedDatasets: React.Dispatch>; }> = React.memo(({ selectedDatasets, setSelectedDatasets }) => { - const { data: datasetsList, isLoading } = useGetDatasets(); + const { data: datasetsList, isLoading, isFetched } = useGetDatasets(); const onChange = useMemoizedFn((v: string[]) => { setSelectedDatasets(v); @@ -134,6 +134,7 @@ const DatasetListContainer: React.FC<{ return ( { className?: string; placeholder?: string; value: string[]; + disabled?: boolean; } export const SelectMultiple: React.FC = React.memo( @@ -26,7 +27,8 @@ export const SelectMultiple: React.FC = React.memo( placeholder = 'Select items...', size = 'default', variant = 'default', - value + value, + disabled }) => { const selectedRecord = useMemo(() => { return itemsProp.reduce>((acc, item) => { @@ -80,6 +82,7 @@ export const SelectMultiple: React.FC = React.memo( selectVariants({ variant, size }), 'relative overflow-hidden pr-0', selectedItems.length > 0 && 'pl-1!', + disabled && 'cursor-not-allowed opacity-80', className )}>