Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #3219 from matrix-org/travis/fix-delay
Browse files Browse the repository at this point in the history
Fix autocomplete delay text field not accepting text
  • Loading branch information
turt2live authored Jul 15, 2019
2 parents 3fcbd46 + 345dbce commit d08cb70
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export default class PreferencesUserSettingsTab extends React.Component {
autoLaunchSupported: false,
minimizeToTray: true,
minimizeToTraySupported: false,
autocompleteDelay: SettingsStore.getValueAt(SettingLevel.DEVICE, 'autocompleteDelay').toString(10),
};
}

Expand Down Expand Up @@ -98,6 +99,7 @@ export default class PreferencesUserSettingsTab extends React.Component {
};

_onAutocompleteDelayChange = (e) => {
this.setState({autocompleteDelay: e.target.value});
SettingsStore.setValue("autocompleteDelay", null, SettingLevel.DEVICE, e.target.value);
};

Expand Down Expand Up @@ -139,7 +141,7 @@ export default class PreferencesUserSettingsTab extends React.Component {
{minimizeToTrayOption}
{autoLaunchOption}
<Field id={"autocompleteDelay"} label={_t('Autocomplete delay (ms)')} type='number'
value={SettingsStore.getValueAt(SettingLevel.DEVICE, 'autocompleteDelay').toString(10)}
value={this.state.autocompleteDelay}
onChange={this._onAutocompleteDelayChange} />
</div>
</div>
Expand Down

0 comments on commit d08cb70

Please sign in to comment.