Page MenuHomePhabricator

D3769.diff
No OneTemporary

D3769.diff

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

File Metadata

Mime Type
text/plain
Expires
Thu, Sep 19, 3:39 PM (7 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2140377
Default Alt Text
D3769.diff (2 KB)

Event Timeline