Merge pull request #3219 from matrix-org/travis/fix-delay

Fix autocomplete delay text field not accepting text
This commit is contained in:
Travis Ralston 2019-07-15 09:30:33 -06:00 committed by GitHub
commit d08cb70fa6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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),
};
}
@ -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);
};
@ -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>