Lose underscore

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
pull/21833/head
Šimon Brandner 2021-09-20 17:16:01 +02:00
parent 459e028137
commit 26ae71f093
No known key found for this signature in database
GPG Key ID: 55C211A1226CB17D
1 changed files with 6 additions and 6 deletions

View File

@ -57,7 +57,7 @@ interface IState {
*/ */
@replaceableComponent("views.elements.EditableTextContainer") @replaceableComponent("views.elements.EditableTextContainer")
export default class EditableTextContainer extends React.Component<IProps, IState> { export default class EditableTextContainer extends React.Component<IProps, IState> {
private _unmounted = false; private unmounted = false;
public static defaultProps: Partial<IProps> = { public static defaultProps: Partial<IProps> = {
initialValue: "", initialValue: "",
placeholder: "", placeholder: "",
@ -82,13 +82,13 @@ export default class EditableTextContainer extends React.Component<IProps, IStat
this.setState({ busy: true }); this.setState({ busy: true });
try { try {
const initialValue = await this.props.getInitialValue(); const initialValue = await this.props.getInitialValue();
if (this._unmounted) return; if (this.unmounted) return;
this.setState({ this.setState({
busy: false, busy: false,
value: initialValue, value: initialValue,
}); });
} catch (error) { } catch (error) {
if (this._unmounted) return; if (this.unmounted) return;
this.setState({ this.setState({
errorString: error.toString(), errorString: error.toString(),
busy: false, busy: false,
@ -97,7 +97,7 @@ export default class EditableTextContainer extends React.Component<IProps, IStat
} }
public componentWillUnmount(): void { public componentWillUnmount(): void {
this._unmounted = true; this.unmounted = true;
} }
private onValueChanged = (value: string, shouldSubmit: boolean): void => { private onValueChanged = (value: string, shouldSubmit: boolean): void => {
@ -112,14 +112,14 @@ export default class EditableTextContainer extends React.Component<IProps, IStat
this.props.onSubmit(value).then( this.props.onSubmit(value).then(
() => { () => {
if (this._unmounted) { return; } if (this.unmounted) { return; }
this.setState({ this.setState({
busy: false, busy: false,
value: value, value: value,
}); });
}, },
(error) => { (error) => {
if (this._unmounted) { return; } if (this.unmounted) { return; }
this.setState({ this.setState({
errorString: error.toString(), errorString: error.toString(),
busy: false, busy: false,