Skip to content

Commit

Permalink
fix list description not updating properyl
Browse files Browse the repository at this point in the history
  • Loading branch information
blackforestboi committed May 31, 2024
1 parent 43d7a42 commit f1e9fe7
Showing 1 changed file with 9 additions and 17 deletions.
26 changes: 9 additions & 17 deletions src/dashboard-refactor/search-results/components/list-details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,23 +75,15 @@ export default class ListDetails extends PureComponent<Props, State> {
}
}

// componentDidUpdate(prevProps: Props, prevState: State) {
// if (
// prevState.isEditingDescription !== this.state.isEditingDescription
// ) {
// this.editorRef?.setEditable(this.state?.isEditingDescription)

// if (
// !this.editorRef?.checkIfHasContent() &&
// !this.state?.isEditingDescription
// ) {
// this.setState({ shouldShowEditor: false })
// } else if (this.state?.isEditingDescription) {
// this.setState({ shouldShowEditor: true })
// this.editorRef.focus()
// }
// }
// }
componentDidUpdate(prevProps: Props, prevState: State) {
if (prevProps.description !== this.props.description) {
if (this.props.description != null) {
this.editorRef?.updateContentExternally(this.props.description)
} else {
this.editorRef?.updateContentExternally('')
}
}
}

async componentWillUpdate(nextProps: Props, prevState: State) {
if (this.props.listData.unifiedId !== nextProps.listData.unifiedId) {
Expand Down

0 comments on commit f1e9fe7

Please sign in to comment.