Skip to content

Commit

Permalink
SearchControl: Fix rest props mutation (WordPress#65740)
Browse files Browse the repository at this point in the history
Co-authored-by: tyxla <tyxla@git.wordpress.org>
Co-authored-by: mirka <0mirka00@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
  • Loading branch information
4 people authored and huubl committed Oct 2, 2024
1 parent 44b09af commit d3603d5
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 d3603d5

Please sign in to comment.