Closed morelgarisi closed 2 years ago
<Common.RadioGroup radioButtons={[ { id: '1', label: 'אופציה 1', value: 'option1', color: 'blue', layout: 'row', size: 24, }, { id: '2', label: 'אופציה 2', value: 'option2', layout: 'row', size: 26, }, ]} layout={'row'} onPress={arr=> { console.log('pressed group') let sel=arr.find(e => e.selected)?.value this.setState({radio_selected:sel}) }} containerStyle={{ backgroundColor: 'yellow' }} />
whats the point of this line : if (!_.isEqual(radioButtons, radioButtonsLocal)) { setRadioButtonsLocal(radioButtons); } by removing it everything works
<Common.RadioGroup radioButtons={[ { id: '1', label: 'אופציה 1', value: 'option1', color: 'blue', layout: 'row', size: 24, }, { id: '2', label: 'אופציה 2', value: 'option2', layout: 'row', size: 26, }, ]} layout={'row'} onPress={arr=> { console.log('pressed group') let sel=arr.find(e => e.selected)?.value this.setState({radio_selected:sel}) }} containerStyle={{ backgroundColor: 'yellow' }} />