[ADF-2859] conditional evaluation of disabled state for content actions (#3450)

* react on [disabled] binding changes

* [disabled] binding updates for context menu items

* evaluating disabled state with a function

* unit test

* restore original description

* remove irrelevant test

* fix tests
This commit is contained in:
Denys Vuika
2018-06-07 23:28:01 +01:00
committed by Eugenio Romano
parent 08fd49c4e3
commit cb88a22a76
10 changed files with 199 additions and 93 deletions

View File

@@ -952,20 +952,6 @@ fdescribe('DataTable', () => {
expect(dataTable.getCellTooltip(row, col)).toBeNull();
});
it('should cache the rows menu', () => {
let emitted = 0;
dataTable.showRowActionsMenu.subscribe(() => { emitted++; });
const column = <DataColumn> {};
const row = <DataRow> { getValue: function (key: string) { return 'id'; } };
dataTable.getRowActions(row, column);
dataTable.getRowActions(row, column);
dataTable.getRowActions(row, column);
expect(emitted).toBe(1);
});
it('should reset the menu cache after rows change', () => {
let emitted = 0;
dataTable.showRowActionsMenu.subscribe(() => { emitted++; });