mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-06-05 22:09:38 +02:00
refactor(types): Sintassi "moderna" Array
This commit is contained in:
@ -87,11 +87,11 @@ export default class DataTable extends Component {
|
||||
</div>;
|
||||
}
|
||||
|
||||
tableColumns(children: Array<Children>) {
|
||||
tableColumns(children: Children[]) {
|
||||
return this.filterElements(children.flat(), TableColumn);
|
||||
}
|
||||
|
||||
tableRows(children: Array<Children>) {
|
||||
tableRows(children: Children[]) {
|
||||
let rows = this.filterElements(children.flat(), TableRow);
|
||||
|
||||
if (this.attrs.has('checkable')) {
|
||||
@ -105,11 +105,11 @@ export default class DataTable extends Component {
|
||||
return rows;
|
||||
}
|
||||
|
||||
tableFooter(children: Array<Children>) {
|
||||
tableFooter(children: Children[]) {
|
||||
return this.filterElements(children.flat(), TableFooter);
|
||||
}
|
||||
|
||||
filterElements(elements: Array<Children>, tag: Component | string): Array<Children> {
|
||||
filterElements(elements: Children[], tag: Component | string): Children[] {
|
||||
const filtered = [];
|
||||
|
||||
for (const element: Vnode of elements) {
|
||||
|
Reference in New Issue
Block a user