Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trigger is editing when the text is changed #825

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions assets/src/components/account/UserProfile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,17 @@ class UserProfile extends React.Component<Props, State> {
};

handleChangeFullName = (e: React.ChangeEvent<HTMLInputElement>) => {
this.setState({isEditing: true});
this.setState({fullName: e.target.value});
};

handleChangeDisplayName = (e: React.ChangeEvent<HTMLInputElement>) => {
this.setState({isEditing: true});
this.setState({displayName: e.target.value});
};

handleChangeProfilePhotoUrl = (e: React.ChangeEvent<HTMLInputElement>) => {
this.setState({isEditing: true});
this.setState({profilePhotoUrl: e.target.value});
};

Expand Down Expand Up @@ -180,7 +183,6 @@ class UserProfile extends React.Component<Props, State> {
value={fullName}
onChange={this.handleChangeFullName}
placeholder="What's your name?"
disabled={!isEditing}
/>
</Box>

Expand All @@ -192,7 +194,6 @@ class UserProfile extends React.Component<Props, State> {
value={displayName}
onChange={this.handleChangeDisplayName}
placeholder="How would you like your name to be displayed?"
disabled={!isEditing}
/>
</Box>

Expand All @@ -216,7 +217,6 @@ class UserProfile extends React.Component<Props, State> {
value={profilePhotoUrl}
onChange={this.handleChangeProfilePhotoUrl}
placeholder="Enter an image URL for your profile photo"
disabled={!isEditing}
/>
</Box>

Expand Down