I am trying to use Fast UI controls with React and TypeScript. I followed the React integration instructions, but my onChange
events are not triggering. What am I missing?
The onClick
event is working on the checkbox, but onChange is really what I am after.
My code:
import {
provideFASTDesignSystem,
fastCheckbox,
fastSelect,
fastOption
} from '@microsoft/fast-components';
import { provideReactWrapper } from '@microsoft/fast-react-wrapper';
const { wrap } = provideReactWrapper(
React,
provideFASTDesignSystem()
);
const FastCheckbox = wrap(fastCheckbox());
const FastSelect = wrap(fastSelect());
const FastOption = wrap(fastOption());
<FastCheckbox
checked={props.properties["fieldsetCheckbox"]}
onChange={(e: any) => {console.log("onChange");}
/>
<FastSelect
value={props.properties["fieldsetCascadingSelect"][0]}
onchange={(e: any) => {console.log("onchange");}}
>
<FastOption value="">Select Family...</FastOption>
{familiesList.map(item => <FastOption value={item.value}>{item.name}</FastOption>)}
</FastSelect>