Skip to content

Commit

Permalink
fix(autocomplete): remove icon prop and use prefix/suffix instead
Browse files Browse the repository at this point in the history
  • Loading branch information
clementprevot committed Jul 20, 2023
1 parent 98113c1 commit cfad72c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ export const Autocomplete = forwardRef<HTMLInputElement, AutocompleteProps>(
dropdown = {},
error,
fullWidth = false,
icon,
id = uniqueId('fractal-autocomplete-'),
label,
name,
Expand Down Expand Up @@ -177,7 +176,6 @@ export const Autocomplete = forwardRef<HTMLInputElement, AutocompleteProps>(
error={hasErrorMessage}
fullWidth={fullWidth}
name={name || id}
prefix={icon}
{...(placeholder !== undefined ? { placeholder } : {})}
readOnly={readOnly}
required={required}
Expand All @@ -186,6 +184,7 @@ export const Autocomplete = forwardRef<HTMLInputElement, AutocompleteProps>(
{...(value !== undefined ? { value } : {})}
onBlur={handleInputBlur}
onChange={handleInputChange}
{...omit(['className'], props)}
/>

<RxDropdownMenu.Root
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ export interface AutocompleteProps extends Omit<InputTextProps, 'onSelect'> {
error?: string
/** Indicates if the autocomplete should take all the available width. */
fullWidth?: boolean
/** The icon to display on the left of the autocomplete input field. */
icon?: ReactNode
/**
* A unique HTML id for the autocomplete.
*
Expand Down

0 comments on commit cfad72c

Please sign in to comment.