[SSE] Bug 43859

This commit is contained in:
Julia Radzhabova 2019-12-26 16:27:59 +03:00
parent 93ba695883
commit 45316abe9d
2 changed files with 7 additions and 4 deletions

View file

@ -250,10 +250,8 @@ define([
props: props, props: props,
api: me.api, api: me.api,
handler: function (result, settings) { handler: function (result, settings) {
if (result == 'ok') { if (me && me.api) {
if (me && me.api) { me.api.asc_setSortProps(settings, result != 'ok');
me.api.asc_setSortProps(settings);
}
} }
} }
})).show(); })).show();

View file

@ -98,6 +98,10 @@ define([ 'text!spreadsheeteditor/main/app/template/SortDialog.template',
this.sortOptions = {}; this.sortOptions = {};
this.options.handler = function(result, value) { this.options.handler = function(result, value) {
if (!value) {
value = new Asc.CSortProperties();
value.asc_setSelection(options.props.asc_getSelection());
}
if ( result != 'ok' || this.isListValid() ) { if ( result != 'ok' || this.isListValid() ) {
if (options.handler) if (options.handler)
options.handler.call(this, result, value); options.handler.call(this, result, value);
@ -593,6 +597,7 @@ define([ 'text!spreadsheeteditor/main/app/template/SortDialog.template',
} }
}); });
props.asc_setLevels(arr); props.asc_setLevels(arr);
props.asc_setSelection(this.props.asc_getSelection());
return props; return props;
}, },