diff --git a/web/modals/threads/thread-settings-modal.react.js b/web/modals/threads/thread-settings-modal.react.js --- a/web/modals/threads/thread-settings-modal.react.js +++ b/web/modals/threads/thread-settings-modal.react.js @@ -100,6 +100,7 @@ +onChangeDescription: (event: SyntheticEvent) => void, +onChangeColor: (color: string) => void, +onChangeThreadType: (event: SyntheticEvent) => void, + +onChangeAccountPassword: (event: SyntheticEvent) => void, }; class ThreadSettingsModal extends React.PureComponent { nameInput: ?HTMLInputElement; @@ -193,7 +194,7 @@ mainContent = ( @@ -294,11 +295,6 @@ this.accountPasswordInput = accountPasswordInput; }; - onChangeAccountPassword = (event: SyntheticEvent) => { - const target = event.currentTarget; - this.props.setAccountPassword(target.value); - }; - onSubmit = (event: SyntheticEvent) => { event.preventDefault(); this.props.dispatchActionPromise( @@ -458,6 +454,14 @@ [queuedChanges, threadInfo], ); + const onChangeAccountPassword = React.useCallback( + (event: SyntheticEvent) => { + const target = event.currentTarget; + setAccountPassword(target.value); + }, + [], + ); + if (!threadInfo) { return ( @@ -494,6 +498,7 @@ onChangeDescription={onChangeDescription} onChangeColor={onChangeColor} onChangeThreadType={onChangeThreadType} + onChangeAccountPassword={onChangeAccountPassword} /> ); },