From 4c6c47b401d5766d77abc5c90652103c5a809219 Mon Sep 17 00:00:00 2001 From: Nikunj Hudka Date: Sun, 23 Feb 2025 22:58:54 -0400 Subject: [PATCH] feat: ui:disabled allowed in EntityTagsPicker Signed-off-by: Nikunj Hudka --- .../components/fields/EntityTagsPicker/EntityTagsPicker.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/scaffolder/src/components/fields/EntityTagsPicker/EntityTagsPicker.tsx b/plugins/scaffolder/src/components/fields/EntityTagsPicker/EntityTagsPicker.tsx index 25b5d926a5..ed09e03c13 100644 --- a/plugins/scaffolder/src/components/fields/EntityTagsPicker/EntityTagsPicker.tsx +++ b/plugins/scaffolder/src/components/fields/EntityTagsPicker/EntityTagsPicker.tsx @@ -45,6 +45,8 @@ export const EntityTagsPicker = (props: EntityTagsPickerProps) => { const kinds = uiSchema['ui:options']?.kinds; const showCounts = uiSchema['ui:options']?.showCounts; const helperText = uiSchema['ui:options']?.helperText; + const isDisabled = uiSchema?.['ui:disabled'] ?? false; + const { t } = useTranslationRef(scaffolderTranslationRef); const { loading, value: existingTags } = useAsync(async () => { @@ -101,6 +103,7 @@ export const EntityTagsPicker = (props: EntityTagsPickerProps) => { freeSolo filterSelectedOptions onChange={setTags} + disabled={isDisabled} value={formData || []} inputValue={inputValue} loading={loading} @@ -113,6 +116,7 @@ export const EntityTagsPicker = (props: EntityTagsPickerProps) => { setInputValue(e.target.value)} error={inputError} helperText={helperText ?? t('fields.entityTagsPicker.description')}