- Notifications
You must be signed in to change notification settings - Fork 974
Open
Description
💬 Question
I have an OverflowMenu that is throwing the following warning:
Warning: MeasureElement: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.
OverflowMenu Implementation:
<View style={{ flex: 1, flexDirection: 'row' }}> <Text style={{ flex: 2, textAlign: 'left', color: 'black' }}>{item.quantity}</Text> <OverflowMenu anchor={() => renderToggleButton(index)} visible={visibleIndex === index} onSelect={() => setVisibleIndex(null)} onBackdropPress={() => setVisibleIndex(null)} > <MenuItem title='Full' /> <MenuItem title='Low' /> <MenuItem title='Consumed' /> </OverflowMenu> </View> renderToggleButton:
const renderToggleButton = useCallback((index) => ( <TouchableOpacity onPress={() => setVisibleIndex(index)}> <View style={{ flex: 1 }}> <Icon name="arrow-down" style={{ width: 20, height: 20 }} /> </View> </TouchableOpacity> ), []) UI Kitten and Eva version
| Package | Version |
|---|---|
| @eva-design/eva | 5.3.1 |
| @ui-kitten/components | 5.3.1 |
storm2513, agottfredsson, enzogain, acoulon99, codingspook and 7 morevinodsptharsha, lucascognamiglio1 and ckeating99
Metadata
Metadata
Assignees
Labels
No labels