🤖 Merge PR #46229 [tabulator-tables] findTable returns Tabulator[] instead of single Ta… by @simusr2

* [tabulator-tables] findTable returns Tabulator[] instead of single Tabulator object

In Tabulator 4.7 findTable returns Tabulator[] instead of single Tabulator object.

'The findTable function will return an array of matching tables.'

Ref:  http://tabulator.info/docs/4.7/options#find-table

* [tabulator-tables] Updated findTable test
This commit is contained in:
simusr2 2020-07-22 17:54:23 +02:00 committed by GitHub
parent f6295bd21d
commit da25cdaf3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -2212,8 +2212,8 @@ declare class Tabulator {
The function takes three arguments, the name of the module, the name of the property you want to extend, and an object containing the elements you want to add in your module. In the example below we extend the format module to add two new default formatters: */
extendModule: (name: string, property: string, values: {}) => void;
/** Lookup the table object for any existing table using the element they were created on. */
findTable: (query: string) => Tabulator;
/** Lookup table objects for any existing table using the element they were created on. */
findTable: (query: string) => Tabulator[];
/**The getInvalidCells method returns an array of Cell Components for all cells flagged as invalid after a user edit. */
getInvalidCells: () => Tabulator.CellComponent[];

View File

@ -594,7 +594,7 @@ table = new Tabulator('#test', {});
table.blockRedraw();
table.restoreRedraw();
table = Tabulator.prototype.findTable('#example-table');
table = Tabulator.prototype.findTable('#example-table')[0];
table.getRows('visible');
table.deleteRow([15, 7, 9]);