Skip to content

Commit

Permalink
SearchControl: Fix rest props mutation (#65740)
Browse files Browse the repository at this point in the history
Co-authored-by: tyxla <[email protected]>
Co-authored-by: mirka <[email protected]>
Co-authored-by: Mamaduka <[email protected]>
  • Loading branch information
4 people authored Oct 1, 2024
1 parent 1bf729a commit aa2c25a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/components/src/search-control/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function UnforwardedSearchControl(
) {
// @ts-expect-error The `disabled` prop is not yet supported in the SearchControl component.
// Work with the design team (@WordPress/gutenberg-design) if you need this feature.
delete restProps.disabled;
const { disabled, ...filteredRestProps } = restProps;

const searchRef = useRef< HTMLInputElement >( null );
const instanceId = useInstanceId(
Expand Down Expand Up @@ -117,7 +117,7 @@ function UnforwardedSearchControl(
/>
</SuffixItemWrapper>
}
{ ...restProps }
{ ...filteredRestProps }
/>
</ContextSystemProvider>
);
Expand Down

0 comments on commit aa2c25a

Please sign in to comment.