Skip to content

Commit

Permalink
fix(combobox): update types (#2782)
Browse files Browse the repository at this point in the history
* fix: combobox types

* chore: add changeset
  • Loading branch information
shleewhite committed Oct 31, 2022
1 parent d2a3310 commit efffcde
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changeset/stale-tools-admire.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@twilio-paste/combobox': patch
'@twilio-paste/core': patch
---

[Combobox] remove inherited HTML `autoComplete` prop because it conflicts with the autocomplete prop and remove state prop from Multiselect Combobox because we don't support using it with the useComboboxState hook.
5 changes: 4 additions & 1 deletion packages/paste-core/components/combobox/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ export type HighlightedIndexChanges = {
inputValue: string;
};

export interface ComboboxProps extends Omit<InputProps, 'id' | 'type' | 'value'>, Pick<BoxProps, 'element'> {
export interface ComboboxProps
extends Omit<InputProps, 'id' | 'type' | 'value' | 'autoComplete'>,
Pick<BoxProps, 'element'> {
autocomplete?: boolean;
helpText?: string | React.ReactNode;
labelText: string | NonNullable<React.ReactNode>;
Expand Down Expand Up @@ -89,6 +91,7 @@ export interface MultiselectComboboxProps
| 'onSelectedItemChange'
| 'getA11yStatusMessage'
| 'getA11ySelectionMessage'
| 'state'
> {
initialSelectedItems?: any[];
onSelectedItemsChange?: (newSelectedItems: any[]) => void;
Expand Down

0 comments on commit efffcde

Please sign in to comment.