File tree Expand file tree Collapse file tree
client/src/pages/platform/workflow-editor/components/properties/hooks Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -220,11 +220,23 @@ export const useProperty = ({
220220 parameterValue !== undefined ? parameterValue : property . defaultValue || ''
221221 ) ;
222222 const [ selectValue , setSelectValue ] = useState ( ( ) => {
223- if ( parameterValue !== undefined && parameterValue !== null ) {
224- return typeof parameterValue === 'boolean' ? parameterValue . toString ( ) : parameterValue ;
223+ if ( parameterValue !== undefined ) {
224+ if ( parameterValue === null ) {
225+ return 'null' ;
226+ }
227+
228+ return String ( parameterValue ) ;
229+ }
230+
231+ if ( property . defaultValue !== undefined ) {
232+ if ( property . defaultValue === null ) {
233+ return 'null' ;
234+ }
235+
236+ return String ( property . defaultValue ) ;
225237 }
226238
227- return property . defaultValue !== undefined ? property . defaultValue : 'null' ;
239+ return 'null' ;
228240 } ) ;
229241 const [ showInputTypeSwitchButton , setShowInputTypeSwitchButton ] = useState (
230242 ! control && ( ( property . type !== 'STRING' && property . expressionEnabled ) || false )
You can’t perform that action at this time.
0 commit comments