Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rewrite
<FormTokenField>
to functional component and Typescript. (#…
…41216) * refactor `<TokenInput>` to functional component and Typescript. * Remove findRenderedComponentWithType as it does not work with functional components. * use findRenderedDOMComponentWithTag instead of findRenderedComponentWithType * convert `<Token>` to TypeScript * type only import * convert SuggestionsList to TypeScript * Change to not use withSafeTimeout. ref: #19109 * Remove comment because tabIndex is not specified. * add type for dom-scroll-into-view * add form-token-field dir to include in tsconfig.json * refactoring types. * fix type. * refactor FormTokenField to TypeScript and Functional Component * refactor story * allow set suggestions in stories. * Use act where useEffect is relevant. * separate state * revert ts-nocheck * remove onChange prop form storybook * Update packages/components/src/form-token-field/token-input.tsx Co-authored-by: Lena Morita <[email protected]> * use ComponentProps * add type docs * replace token-field-wrapper to tsx * add doc comment for FormTokenField * fix type docs * Update packages/components/src/form-token-field/types.ts Co-authored-by: Lena Morita <[email protected]> * Update packages/components/src/form-token-field/types.ts Co-authored-by: Lena Morita <[email protected]> * Update packages/components/src/form-token-field/index.tsx Co-authored-by: Lena Morita <[email protected]> * Update packages/components/src/form-token-field/index.tsx Co-authored-by: Lena Morita <[email protected]> * Update packages/components/src/form-token-field/index.tsx Co-authored-by: Lena Morita <[email protected]> * change variable and function name * Fix useEffect to updateSuggestions(). * Disabled control for __experimentalValidateInput. Update type document. * add changelog * Update packages/components/src/form-token-field/index.tsx Co-authored-by: Lena Morita <[email protected]> Co-authored-by: Lena Morita <[email protected]>
- Loading branch information