Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3377866
D3769.id11752.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D3769.id11752.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 28, 7:54 AM (20 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2593304
Default Alt Text
D3769.id11752.diff (2 KB)
Attached To
Mode
D3769: [web] Move `onChangeAccountPassword` up from `ThreadSettingsModal` to `ConnectedThreadSettingsModal`
Attached
Detach File
Event Timeline
Log In to Comment