Skip to content

Commit a36d6ef

Browse files
committed
Fix tag input (#3832)
1 parent 695b433 commit a36d6ef

File tree

1 file changed

+5
-2
lines changed
  • apps/audius-client/packages/web/src/components/data-entry

1 file changed

+5
-2
lines changed

apps/audius-client/packages/web/src/components/data-entry/TagInput.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,14 @@ class TagInput extends Component {
3434

3535
newTagInputRef = createRef()
3636

37-
componentDidUpdate = () => {
37+
componentDidUpdate = (prevProps, prevState) => {
3838
if (this.state.typingMode && this.newTagInputRef.current) {
3939
this.newTagInputRef.current.focus()
4040
}
41-
if (this.state.tags !== this.props.tags) {
41+
if (
42+
prevState.tags === this.state.tags &&
43+
prevProps.tags !== this.props.tags
44+
) {
4245
this.setState({ tags: this.props.tags })
4346
}
4447
}

0 commit comments

Comments
 (0)