import { AnyAction, ControlProps, Dispatch, OwnPropsOfEnum, RankedTester, withIncreasedRank, Actions } from '@json-forms/core'; import { ExtendedUnwrapped } from '../src/extended'; import { materialAutocompleteOneOfEnumControlTester } from '../src/extended/MaterialAutocompleteOneOfEnumControl'; import { withJsonFormsOneOfEnumProps } from '@json-forms/react'; import React from 'react'; import Typography from '@material-ui/core/Typography'; const MyAutocompleteControl = (props: ControlProps & OwnPropsOfEnum) => { return ( ({`${option?.value}\t-\t${option?.label}`})} filterOptions={(options, state) => options.filter(o => o.label.includes(state.inputValue) || o.value.includes(state.inputValue))} /> ); }; const myAutocompleteTester: RankedTester = withIncreasedRank( 1, materialAutocompleteOneOfEnumControlTester ); const ConnectedControl = withJsonFormsOneOfEnumProps(MyAutocompleteControl); export const ExampleExtension = (dispatch: Dispatch) => (
);