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) => {
118
118
newValue . push ( RenderSubValue ( val ) ) ;
119
119
}
120
120
} 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 ]
122
124
. _fields [ realValueRowIndex ] ;
123
125
124
126
newValue =
@@ -165,8 +167,13 @@ const NodePropertyParameterSelectComponent = (props: ParameterSelectProps) => {
165
167
/>
166
168
) ;
167
169
}
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 ) ) ;
169
175
options = props . autoSort ? options . sort ( ) : options ;
176
+
170
177
return (
171
178
< div className = { 'n-flex n-flex-row n-flex-wrap n-items-center' } >
172
179
< Autocomplete
You can’t perform that action at this time.
0 commit comments