Skip to content

Commit

Permalink
minor fix - fixed forwardRef and unique key console errors (twentyhq#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ehconitin authored Oct 1, 2024
1 parent a940912 commit c505a8e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ export const ObjectFilterDropdownFilterSelect = () => {
(availableFilterDefinition, index) => (
<SelectableItem
itemId={availableFilterDefinition.fieldMetadataId}
key={`select-filter-${index}`}
>
<ObjectFilterDropdownFilterSelectMenuItem
key={`select-filter-${index}`}
filterDefinition={availableFilterDefinition}
/>
</SelectableItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ const StyledInput = styled.input`
export const DropdownMenuSearchInput = forwardRef<
HTMLInputElement,
InputHTMLAttributes<HTMLInputElement>
>(({ value, onChange, placeholder = 'Search', type }) => {
>(({ value, onChange, placeholder = 'Search', type }, forwardedRef) => {
const { inputRef } = useInputFocusWithoutScrollOnMount();

const ref = forwardedRef ?? inputRef;
return (
<StyledDropdownMenuSearchInputContainer>
<StyledInput
autoComplete="off"
{...{ onChange, placeholder, type, value }}
ref={inputRef}
ref={ref}
/>
</StyledDropdownMenuSearchInputContainer>
);
Expand Down

0 comments on commit c505a8e

Please sign in to comment.