-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"dispatchCommand was called with a ref that isn't a native component" in searchbar while focusing using ref #2394
Comments
Couldn't find version numbers for the following packages in the issue:
Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3. The versions mentioned in the issue for the following packages differ from the latest versions on npm:
Can you verify that the issue still exists after upgrading to the latest versions of these packages? |
Couldn't find version numbers for the following packages in the issue:
Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3. |
ref doesn't seem to work with Searchbar anymore since some version 4.x.x something, I can confirm. Can someone help us? |
Having same issue on v4.7.0 |
tried to downgrade to v4.2.0. it works |
Current behaviour
Warning: dispatchCommand was called with a ref that isn't a native component. Use React.forwardRef to get access to the underlying native component
This warning is appearing while using searchbar component ref while using focus() method
Expected behaviour
It should focus the searchbar input
Stack trace:
Warning: dispatchCommand was called with a ref that isn't a native component. Use React.forwardRef to get access to the underlying native component
Code sample
`import React, { useRef, useState } from "react";
import { Modal, SafeAreaView, StyleSheet, View} from "react-native";
import { IconButton, Searchbar } from "react-native-paper";
// import colors from "../assets/config/colors";
const SearchModal = ({ visible, onClose }) => {
};
export default SearchModal;
const styles = StyleSheet.create({
header: {
flexDirection: "row",
alignItems: "center"
},
});
`
What have you tried
Your Environment
The text was updated successfully, but these errors were encountered: