Skip to content

Instantly share code, notes, and snippets.

@awinogradov
Last active August 24, 2023 16:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save awinogradov/21c697ba52d70206f8453cc248c32f68 to your computer and use it in GitHub Desktop.
Save awinogradov/21c697ba52d70206f8453cc248c32f68 to your computer and use it in GitHub Desktop.
Autocomplete
<AutoCompleteSingle items={[{ value: 'one' }]} onChange={(value: string) => {}} />
<AutoCompleteMulti items={[]} onChange={(value: string[]) => {}} />
<AutoCompleteMulti items={[]} onChange={(value: string[]) => {}}>
<AutoCompleteInput onChange={(e) => {}} />
<AutoCompleteTitle>Suggestions:</AutoCompleteTitle>
</AutoCompleteMulti>
<AutoCompleteMulti value={[]} items={[]} renderItem={(item) => ()} onChange={(value: string[]) => {}}>
<AutoCompleteInput onChange={(e) => {}} />
<AutoCompleteCheckBoxGroup items={[{ title: 'one', value: 'one' }]} onChange={(value: string[]) => {}} />
<AutoCompleteSeletedTitle>Selected:</AutoCompleteSeletedTitle>
<AutoCompleteSelectedItems items={[]} renderItem={(item) => ()} />
<AutoCompleteSuggestionsTitle>Suggestions:</AutoCompleteSuggestionsTitle>
</AutoCompleteMulti>
<AutoCompleteSingle items={[]} renderItem={(item) => ()} renderItems={(items: ReactNode) => ()} onChange={(value: string) => {}}>
<AutoCompleteInput value={} placeholder="" iconLeft={} onChange={(e) => {}} />
<AutoCompleteRadioGroup items={[{ title: 'one', value: 'one' }]} onChange={(value: string) => {}} />
<AutoCompleteSuggestionsTitle>Suggestions:</AutoCompleteSuggestionsTitle>
</AutoCompleteMulti>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment