Sort enviroment variables in the dropdown on edit (#2295)

This commit is contained in:
Sergey 2020-06-16 19:29:29 +02:00 committed by GitHub
parent a200e31e61
commit f399c9e95f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -66,7 +66,7 @@ class VariableEditor extends PureComponent {
}
const context = await this.props.handleGetRenderContext();
const variables = context.keys;
const variables = context.keys.sort((a, b) => (a.name < b.name ? -1 : 1));
const variableSource = context.context.getKeysContext().keyContext[cleanedValue] || '';
// Hack to skip updating if we unmounted for some reason
if (this._select) {