(core) close sort&filter menu when clicking Save/Revert buttons

Summary:
- close sort&filter menu when clicking Save/Revert buttons
- also closes when clicking Apply/Cancel from a nested filter menu

Test Plan:
 - updated existing test to match new spec
 - added new test to cover new behaviour

Reviewers: paulfitz

Reviewed By: paulfitz

Differential Revision: https://phab.getgrist.com/D2799
This commit is contained in:
Cyprien P
2021-05-06 14:23:50 +02:00
parent 570baa95a5
commit 8056bb0069
4 changed files with 24 additions and 16 deletions

View File

@@ -650,8 +650,8 @@ BaseView.prototype.getLastDataRowIndex = function() {
/**
* Creates and opens ColumnFilterMenu for a given field, and returns its PopupControl.
*/
BaseView.prototype.createFilterMenu = function(openCtl, field) {
return createFilterMenu(openCtl, this._sectionFilter, field, this._filteredRowSource, this.tableModel.tableData);
BaseView.prototype.createFilterMenu = function(openCtl, field, onClose) {
return createFilterMenu(openCtl, this._sectionFilter, field, this._filteredRowSource, this.tableModel.tableData, onClose);
};
/**