import React from 'react'; import { TextInput, Alert, NativeSyntheticEvent, TextInputChangeEventData } from 'react-native'; import { Cfg } from './action'; import { Picker } from '@react-native-picker/picker'; import { cfg } from '../lib/cfg'; export function SelectRenderer({ ...props }: { [key: string]: any; }) { const onPress = () => Alert.alert('pressed!'); const { tnode } = props; const { domNode } = tnode; const { attribs } = domNode; const handleChange = (event: any) => { const config = Cfg.action as { [key: string]: (event: Function) => void }; const custAction: ((event: Function) => void) | null = (attribs?.action && typeof config[attribs?.action] === 'function') ? config[attribs?.action] : null; if (custAction) { custAction(event); // Pass only the event } } return ( ); }