File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
src/chart/parameter/component Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -118,7 +118,9 @@ const NodePropertyParameterSelectComponent = (props: ParameterSelectProps) => {
118118 newValue . push ( RenderSubValue ( val ) ) ;
119119 }
120120 } else if ( ! isMulti ) {
121- newValue = extraRecords . filter ( ( r ) => ( r ?. _fields ?. [ displayValueRowIndex ] ?. toString ( ) || null ) == newDisplay ) [ 0 ]
121+ // if records are toStringed before comparison, toString the comparing variable
122+ const newDisplay2 = typeof newDisplay === 'boolean' ? newDisplay . toString ( ) : newDisplay ;
123+ newValue = extraRecords . filter ( ( r ) => ( r ?. _fields ?. [ displayValueRowIndex ] ?. toString ( ) || null ) == newDisplay2 ) [ 0 ]
122124 . _fields [ realValueRowIndex ] ;
123125
124126 newValue =
@@ -165,8 +167,13 @@ const NodePropertyParameterSelectComponent = (props: ParameterSelectProps) => {
165167 />
166168 ) ;
167169 }
168- let options = extraRecords ?. map ( ( r ) => r ?. _fields ?. [ displayValueRowIndex ] || '(no data)' ) ;
170+
171+ // "false" will not be mapped to "(no data)"
172+ let options = extraRecords
173+ ?. map ( ( r ) => r ?. _fields ?. [ displayValueRowIndex ] )
174+ . map ( ( f ) => ( f === undefined || f === null ? '(no data)' : f ) ) ;
169175 options = props . autoSort ? options . sort ( ) : options ;
176+
170177 return (
171178 < div className = { 'n-flex n-flex-row n-flex-wrap n-items-center' } >
172179 < Autocomplete
You can’t perform that action at this time.
0 commit comments