-
Notifications
You must be signed in to change notification settings - Fork 70
Closed
Description
I get this error when trying to render the MenuView
[CoreFoundation] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[MenuView setActionsHash:]: unrecognized selector sent to instance 0x319d4c1a0'
*** First throw call stack:
(
0 CoreFoundation 0x0000000110a1f8c0 __exceptionPreprocess + 172
1 libobjc.A.dylib 0x0000000102c077cc objc_exception_throw + 72
2 CoreFoundation 0x0000000110a350d4 +[NSObject(NSObject) instanceMethodSignatureForSelector:] + 0
3 UIKitCore 0x000000014c258d7c -[UIResponder doesNotRecognizeSelector:] + 232
4 CoreFoundation 0x0000000110a23b18 ___forwarding___ + 1216
5 CoreFoundation 0x0000000110a2605c _CF_forwarding_prep_0 + 92
6 Evolvix.debug.dylib 0x000000010932fb54 __49-[RCTComponentData createPropBlock:isShadowView:]_block_invoke.44 + 388
7 Evolvix.debug.dylib 0x000000010933014c __49-[RCTComponentData createPropBlock:isShadowVi<…>
This is the code:
const MetricSelector = ({
metrics,
metricId,
setMetricId,
}: {
metrics: MetricList
metricId: number | null
setMetricId: Dispatch<SetStateAction<number | null>>
}) => {
const { themed } = useAppTheme()
return (
<MenuView
onPressAction={({ nativeEvent }) => {
const id = parseInt(nativeEvent.event)
if (!isNaN(id)) setMetricId(id)
}}
shouldOpenOnLongPress={false}
actions={metrics.map((metric) => ({
id: metric.id.toString(),
title: metric.name,
}))}
>
<TouchableOpacity style={themed($metricSelectorButton)}>
<Text
weight={"semiBold"}
tx={metricId === null ? "mainMetricsScreen:selectMetric" : undefined}
text={metrics.find((metric) => metric.id === metricId)?.name}
/>
<Icon icon={"chevron-down-circle-outline"} size={20} />
</TouchableOpacity>
</MenuView>
)
}
victorhenrion, techied, gabemeola, code-with-shahzad and baylesa-studiosystems
Metadata
Metadata
Assignees
Labels
No labels