We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f5cb72d commit 926341bCopy full SHA for 926341b
packages/taro-ui/src/components/search-bar/index.tsx
@@ -59,6 +59,12 @@ export default class AtSearchBar extends React.Component<
59
this.props.onActionClick && this.props.onActionClick(event)
60
}
61
62
+ public UNSAFE_componentWillReceiveProps(nextProps: AtSearchBarProps): void {
63
+ if (nextProps.focus !== this.props.focus) {
64
+ this.setState({ isFocus: !!nextProps.focus })
65
+ }
66
67
+
68
public render(): JSX.Element {
69
const {
70
value,
0 commit comments