Skip to content

Commit b7716f7

Browse files
committed
Lint and Prettier
1 parent 814d241 commit b7716f7

4 files changed

Lines changed: 5416 additions & 6426 deletions

File tree

packages/mantine-react-table/src/components/head/MRT_TableHeadCell.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ export const MRT_TableHeadCell = <TData extends MRT_RowData>({
130130
let pl = 0;
131131
if (column.getCanSort()) pl++;
132132
// Only add padding for buttons if they will actually be displayed
133-
if (showColumnButtons && (columnActionsEnabled || showDragHandle)) pl += 1.75;
133+
if (showColumnButtons && (columnActionsEnabled || showDragHandle))
134+
pl += 1.75;
134135
if (showDragHandle) pl += 1.25;
135136
return pl;
136137
}, [showColumnButtons, showDragHandle, columnActionsEnabled]);

packages/mantine-react-table/src/hooks/useMRT_RowVirtualizer.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,10 @@ export const useMRT_RowVirtualizer = <
7373
(row) => row.id === draggingRow?.id,
7474
);
7575

76-
return extraIndexRangeExtractor(range, current_index >= 0 ? current_index: 0);
76+
return extraIndexRangeExtractor(
77+
range,
78+
current_index >= 0 ? current_index : 0,
79+
);
7780
},
7881
[draggingRow],
7982
),

packages/mantine-react-table/stories/fixed-bugs/cell-alignment.stories.tsx

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,7 @@ const createColumns = (): MRT_ColumnDef<Person>[] => [
129129

130130
export const CellAlignment = () => {
131131
//should be memoized or stable
132-
const columns = useMemo<MRT_ColumnDef<Person>[]>(
133-
() => createColumns(),
134-
[]
135-
);
132+
const columns = useMemo<MRT_ColumnDef<Person>[]>(() => createColumns(), []);
136133

137134
const table = useMantineReactTable({
138135
columns,
@@ -151,10 +148,7 @@ export const CellAlignment = () => {
151148
};
152149

153150
export const CellAlignmentWithSorting = () => {
154-
const columns = useMemo<MRT_ColumnDef<Person>[]>(
155-
() => createColumns(),
156-
[]
157-
);
151+
const columns = useMemo<MRT_ColumnDef<Person>[]>(() => createColumns(), []);
158152

159153
const table = useMantineReactTable({
160154
columns,
@@ -172,10 +166,7 @@ export const CellAlignmentWithSorting = () => {
172166
};
173167

174168
export const CellAlignmentWithColumnDragging = () => {
175-
const columns = useMemo<MRT_ColumnDef<Person>[]>(
176-
() => createColumns(),
177-
[]
178-
);
169+
const columns = useMemo<MRT_ColumnDef<Person>[]>(() => createColumns(), []);
179170

180171
const table = useMantineReactTable({
181172
columns,

0 commit comments

Comments
 (0)