File tree Expand file tree Collapse file tree
samples/interactions/query-builder/template/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -293,33 +293,27 @@ export default class Sample extends React.Component<any, SampleState> {
293293
294294 private buildStatusRadios = ( ctx : QueryBuilderSearchValueContext ) => {
295295 const implicitValue = ctx . implicit ?. value ;
296- const currentValue = implicitValue === null ? '' : implicitValue . toString ( ) ;
297- const key = `status-radio-${ currentValue } ` ;
296+ const currentValue = implicitValue == null ? '' : implicitValue . toString ( ) ;
298297
299298 return (
300299 < IgrRadioGroup
301- key = { key }
302300 style = { { gap : '5px' } }
303- alignment = "horizontal"
304- value = { currentValue }
305- change = { ( sender : any ) => {
306- const value = sender . value ;
307- if ( value === undefined ) return ;
308-
309- const numericValue = Number ( value ) ;
310- if ( ctx . implicit . value === numericValue ) return ;
311-
312- setTimeout ( ( ) => {
313- ctx . implicit . value = numericValue ;
314- } ) ;
315- } } >
301+ alignment = "horizontal" >
316302 { this . statusOptions . map ( option => (
317303 < IgrRadio
318304 key = { option . value }
319305 name = "status"
320306 value = { option . value . toString ( ) }
321307 checked = { option . value . toString ( ) === currentValue }
322- labelText = { option . text } >
308+ onChange = { ( e : any ) => {
309+ if ( ! e . detail . checked ) return ;
310+ const numericValue = Number ( e . detail . value ) ;
311+ if ( ctx . implicit . value === numericValue ) return ;
312+ setTimeout ( ( ) => {
313+ ctx . implicit . value = numericValue ;
314+ } ) ;
315+ } } >
316+ < span > { option . text } </ span >
323317 </ IgrRadio >
324318 ) ) }
325319 </ IgrRadioGroup >
You can’t perform that action at this time.
0 commit comments