Skip to content
Snippets Groups Projects
Commit a090a68e authored by Дмитрий Малюгин's avatar Дмитрий Малюгин :clock4:
Browse files

fix: 'Table'

parent 080c686a
No related branches found
No related tags found
1 merge request!4Rating, ProgressBar and Paginator
......@@ -14,6 +14,7 @@ const meta: Meta = {
},
},
argTypes: {
data: { control: 'object' },
columns: { control: 'text' },
fontSize: { control: 'text' },
gap: { control: 'text' },
......
......@@ -45,7 +45,7 @@ const sortState = computed<string[]>(() => {
});
const rows = computed<ITableItem[][]>(() =>
calcRows(
data.value!,
data.value ?? props.data,
sortStateActive.value,
props.multipleSort,
columnToFilter.value,
......
......@@ -2,7 +2,7 @@ import type { ITableColumn, ITableItem, TTableColumnType } from '@interfaces/com
import type { TSize } from '@interfaces/common';
export const calcRows = (
initRows: ITableItem[][],
initRows: ITableItem[][] | undefined,
sortStateActive: [number, string] | [],
multipleSort: boolean,
columnToFilter: number,
......@@ -10,6 +10,7 @@ export const calcRows = (
filterValue: string,
isRegisterSensitive: boolean,
) => {
if (!initRows?.length) return [];
// ['up', 'down', ...]
let rows = [...initRows];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment