Skip to content

Commit 7d322aa

Browse files
kkafarPnlvfx
andcommitted
Allow for nullable ref param in SearchBarCommands types
This is not breaking as it allows for wider gamut of types to be accepted. Ideally we should allow for `React.Ref` there, as suggested here: #2724 (comment), but it'd require some more internal changes. Co-authored-by: Simone Gauli <Pnlvfx@users.noreply.github.com>
1 parent 0577937 commit 7d322aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/types.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,7 @@ export interface SearchBarProps {
832832
* * `cancelSearch` - cancel search in search bar.
833833
* * `toggleCancelButton` - depending on passed boolean value, hides or shows cancel button (iOS only)
834834
*/
835-
ref?: React.RefObject<SearchBarCommands>;
835+
ref?: React.RefObject<SearchBarCommands | null>;
836836

837837
/**
838838
* The auto-capitalization behavior.

0 commit comments

Comments
 (0)