diff --git a/.github/workflows/publish_production.yml b/.github/workflows/publish_production.yml index cc75e743d..5cb25f2e6 100644 --- a/.github/workflows/publish_production.yml +++ b/.github/workflows/publish_production.yml @@ -68,11 +68,6 @@ jobs: AZURE_BLOB_ACCOUNT: ${{ secrets.AZURE_BLOB_ACCOUNT_US2 }} AZURE_BLOB_ACCOUNT_KEY: ${{ secrets.AZURE_BLOB_ACCOUNT_KEY_US2 }} run: yarn upload - - name: upload vabi - env: - AZURE_BLOB_ACCOUNT: ${{ secrets.AZURE_BLOB_ACCOUNT_VABI }} - AZURE_BLOB_ACCOUNT_KEY: ${{ secrets.AZURE_BLOB_ACCOUNT_KEY_VABI }} - run: yarn upload - name: upload vvv env: AZURE_BLOB_ACCOUNT: ${{ secrets.AZURE_BLOB_ACCOUNT_VVV }} diff --git a/src/components/autocompleteInput.js b/src/components/autocompleteInput.js index 7ddd34f3d..86241822c 100644 --- a/src/components/autocompleteInput.js +++ b/src/components/autocompleteInput.js @@ -142,6 +142,10 @@ (hasDefaultLabelProperty && defaultLabelProperty) || idProperty; + useEffect(() => { + setValue(defaultValue.replace(/\n/g, '')); + }, [defaultValue]); + /* * This component only works with relational or list properties. * the value of a list property is the list item itself. diff --git a/src/components/radioinput.js b/src/components/radioinput.js index 9bd2bab7f..2428ef14f 100644 --- a/src/components/radioinput.js +++ b/src/components/radioinput.js @@ -62,6 +62,9 @@ const isListProperty = kind === 'list' || kind === 'LIST'; const isObjectProperty = kind === 'object' || kind === 'OBJECT'; + const isPageVariableProperty = prefabValue.find( + (item) => item.type === 'PAGE_VARIABLE_MODEL_PROPERTY', + ); const isPropertyArray = Boolean( prefabValue.length && prefabValue.some((p) => p.type === 'PROPERTY'), @@ -76,6 +79,8 @@ resolvedCurrentValue = defaultValueText; } else if (isPropertyArray && !isObjectProperty) { resolvedCurrentValue = parseInt(defaultValueText, 10) || ''; + } else if (isPageVariableProperty) { + resolvedCurrentValue = getValue(defaultValueText); } else if (kind === undefined) { // if kind is undefined, it is non property based resolvedCurrentValue = ''; @@ -84,6 +89,10 @@ } const [currentValue, setCurrentValue] = useState(resolvedCurrentValue); + useEffect(() => { + setCurrentValue(resolvedCurrentValue); + }, [defaultValueText]); + B.defineFunction('Clear', () => setCurrentValue('')); B.defineFunction('Enable', () => setIsDisabled(false)); B.defineFunction('Disable', () => setIsDisabled(true)); diff --git a/src/components/selectInput.js b/src/components/selectInput.js index 3202e39bb..eee16f701 100644 --- a/src/components/selectInput.js +++ b/src/components/selectInput.js @@ -63,6 +63,11 @@ : defaultValueText || placeholderLabelText; const [currentValue, setCurrentValue] = useState(resolvedCurrentValue); + + useEffect(() => { + setCurrentValue(resolvedCurrentValue); + }, [defaultValueText]); + B.defineFunction('Clear', () => setCurrentValue('')); B.defineFunction('Enable', () => setIsDisabled(false)); B.defineFunction('Disable', () => setIsDisabled(true));