diff --git a/packages/react-front-kit/.eslintrc.js b/packages/react-front-kit/.eslintrc.js
index bb92a118..f4a8895c 100644
--- a/packages/react-front-kit/.eslintrc.js
+++ b/packages/react-front-kit/.eslintrc.js
@@ -2,6 +2,7 @@ module.exports = {
extends: ['custom'],
parserOptions: {
project: ['./tsconfig.json'],
+ tsconfigRootDir: __dirname,
},
root: true,
rules: {
diff --git a/packages/react-front-kit/src/3-custom/Components/Table/Table.tsx b/packages/react-front-kit/src/3-custom/Components/Table/Table.tsx
index 1f0453ff..3c4feb0c 100644
--- a/packages/react-front-kit/src/3-custom/Components/Table/Table.tsx
+++ b/packages/react-front-kit/src/3-custom/Components/Table/Table.tsx
@@ -1,5 +1,4 @@
'use client';
-
import type { MRT_ColumnDef } from 'mantine-react-table';
import type { ReactNode } from 'react';
@@ -214,7 +213,7 @@ export function Table(): JSX.Element {
header: 'Date publication',
},
],
- []
+ [],
);
const table = useMantineReactTable({
columns,
@@ -232,9 +231,11 @@ export function Table(): JSX.Element {
enableRowSelection: true,
icons: {
+ IconArrowsSort: CaretUpDown,
+ // eslint-disable-next-line react/no-unstable-nested-components, react/no-multi-comp
IconFilter: () => ,
+ // eslint-disable-next-line react/no-unstable-nested-components, react/no-multi-comp
IconFilterOff: () => ,
- IconArrowsSort: CaretUpDown,
IconSortAscending: CaretUp,
IconSortDescending: CaretDown,
},
@@ -288,14 +289,14 @@ export function Table(): JSX.Element {
>
{arbo}
,
- 'Déplacer dans l’arborescence'
+ 'Déplacer dans l’arborescence',
)}
{tooltip(
sendCurrentElementValueWithAction(
cell.row.original,
- 'OPEN_ELEMENT'
+ 'OPEN_ELEMENT',
)
}
radius={4}
@@ -303,14 +304,14 @@ export function Table(): JSX.Element {
>
,
- 'Ouvrir le document'
+ 'Ouvrir le document',
)}
{tooltip(
sendCurrentElementValueWithAction(
cell.row.original,
- 'UPDATE_ELEMENT'
+ 'UPDATE_ELEMENT',
)
}
radius={4}
@@ -318,7 +319,7 @@ export function Table(): JSX.Element {
>
{edit}
,
- 'Modifier le document'
+ 'Modifier le document',
)}
{tooltip(
@@ -347,7 +348,7 @@ export function Table(): JSX.Element {
onClick={() =>
sendCurrentElementValueWithAction(
cell.row.original,
- 'DOWNLOAD'
+ 'DOWNLOAD',
)
}
>
@@ -363,7 +364,7 @@ export function Table(): JSX.Element {
,
- 'Affiche les autres actions'
+ 'Affiche les autres actions',
)}
),
@@ -387,7 +388,7 @@ export function Table(): JSX.Element {
onClick={() => {
sendSelectedElementsValueWithAction(
cell.table.getSelectedRowModel().rows.map((x) => x.original),
- 'ARBO_CHANGE_LOCATION'
+ 'ARBO_CHANGE_LOCATION',
);
}}
style={{ display: 'block', margin: 'auto 0px auto' }}
@@ -399,7 +400,7 @@ export function Table(): JSX.Element {
leftIcon={}
onClick={() => {
multiRemoveHandle(
- cell.table.getSelectedRowModel().rows.map((x) => x.original)
+ cell.table.getSelectedRowModel().rows.map((x) => x.original),
);
}}
style={{ display: 'block', margin: 'auto 10px auto' }}
@@ -474,14 +475,14 @@ export function Table(): JSX.Element {
onClick={() =>
sendCurrentElementValueWithAction(
currentElement,
- 'ADD_TO_FAVORITES'
+ 'ADD_TO_FAVORITES',
)
}
>
Ajouter aux favoris
- >
+ >,
);
open();
};
@@ -513,7 +514,7 @@ export function Table(): JSX.Element {
Partager
- >
+ >,
);
open();
};
@@ -550,7 +551,7 @@ export function Table(): JSX.Element {
Supprimer
- >
+ >,
);
open();
};
@@ -584,23 +585,23 @@ export function Table(): JSX.Element {
Supprimer
- >
+ >,
);
open();
};
const actionButtonOnMouseHandler = (
rowIndex: number,
- enter: boolean
+ enter: boolean,
): void => {
const elementIndex = rowIndex;
- const newDisplayActionsButtonArray = displayActionsButtons.map((_, index) =>
- elementIndex === index ? enter : false
+ const newDisplayActionsButtonArray = displayActionsButtons.map(
+ (_, index) => (elementIndex === index ? enter : false),
);
setDisplayActionsButtons(newDisplayActionsButtonArray);
};
const sendCurrentElementValueWithAction = (
currentElement: IDocument,
- action: string
+ action: string,
): void => {
// eslint-disable-next-line no-console
console.log(currentElement, action);
@@ -608,7 +609,7 @@ export function Table(): JSX.Element {
};
const sendSelectedElementsValueWithAction = (
values: IDocument[],
- action: string
+ action: string,
): void => {
// eslint-disable-next-line no-console
console.log(values, action);