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 @@ -99,6 +99,7 @@ +onChangeDescription: (event: SyntheticEvent) => void, +onChangeColor: (color: string) => void, +onChangeThreadType: (event: SyntheticEvent) => void, + +onChangeAccountPassword: (event: SyntheticEvent) => void, }; class ThreadSettingsModal extends React.PureComponent { nameInput: ?HTMLInputElement; @@ -192,7 +193,7 @@ mainContent = ( @@ -297,11 +298,6 @@ this.accountPasswordInput = accountPasswordInput; }; - onChangeAccountPassword = (event: SyntheticEvent) => { - const target = event.currentTarget; - this.props.setAccountPassword(target.value); - }; - onSubmit = (event: SyntheticEvent) => { event.preventDefault(); this.props.dispatchActionPromise( @@ -462,6 +458,14 @@ [queuedChanges, threadInfo?.type], ); + const onChangeAccountPassword = React.useCallback( + (event: SyntheticEvent) => { + const target = event.currentTarget; + setAccountPassword(target.value); + }, + [], + ); + if (!threadInfo) { return ( @@ -497,6 +501,7 @@ onChangeDescription={onChangeDescription} onChangeColor={onChangeColor} onChangeThreadType={onChangeThreadType} + onChangeAccountPassword={onChangeAccountPassword} /> ); },