Skip to content

Commit e9183b1

Browse files
committed
wip
1 parent b819cb8 commit e9183b1

File tree

6 files changed

+25
-13
lines changed

6 files changed

+25
-13
lines changed

examples/src/pages/tests/table/props/data/update.page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ const dataSourceFn: DataSourceDataFn<Developer> = ({}) => {
4848
setTimeout(() => {
4949
// console.log(data, 'data');
5050
// data.length = 1;
51-
// const newData = [...data.data.slice(0, 3)];
52-
const newData = data;
51+
const newData = [...data.data.slice(0, 2)];
52+
// const newData = data;
5353

5454
resolve(newData);
5555
}, 20);

source/src/components/HeadlessTable/ReactHeadlessTableRenderer.tsx

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1273,6 +1273,16 @@ export class GridRenderer extends Logger {
12731273
};
12741274
}
12751275

1276+
protected onMouseEnterNotBound = (event: React.MouseEvent<HTMLElement>) => {
1277+
const rowIndex = Number((event.target as HTMLElement).dataset.rowIndex);
1278+
this.onMouseEnter(rowIndex);
1279+
};
1280+
protected onMouseLeaveNotBound = (event: React.MouseEvent<HTMLElement>) => {
1281+
const rowIndex = Number((event.target as HTMLElement).dataset.rowIndex);
1282+
1283+
this.onMouseLeave(rowIndex);
1284+
};
1285+
12761286
protected renderCellAt(
12771287
rowIndex: number,
12781288
colIndex: number,
@@ -1323,8 +1333,10 @@ export class GridRenderer extends Logger {
13231333
hidden,
13241334
heightWithRowspan,
13251335
widthWithColspan,
1326-
onMouseEnter: this.onMouseEnter.bind(null, rowIndex),
1327-
onMouseLeave: this.onMouseLeave.bind(null, rowIndex),
1336+
// onMouseEnter: this.onMouseEnter.bind(null, rowIndex),
1337+
onMouseEnter: this.onMouseEnterNotBound, //.bind(null, rowIndex),
1338+
// onMouseLeave: this.onMouseLeave.bind(null, rowIndex),
1339+
onMouseLeave: this.onMouseLeaveNotBound, //.bind(null, rowIndex),
13281340
domRef: cell.ref,
13291341
});
13301342

source/src/components/HeadlessTable/rendererTypes.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ export type TableRenderCellFnParam = {
1616
heightWithRowspan: number;
1717
rowFixed: FixedPosition;
1818
colFixed: FixedPosition;
19-
onMouseEnter: VoidFunction;
20-
onMouseLeave: VoidFunction;
19+
onMouseEnter: (event: React.MouseEvent<HTMLElement>) => void;
20+
onMouseLeave: (event: React.MouseEvent<HTMLElement>) => void;
2121
};
2222

2323
export type TableRenderDetailRowFnParam = {
@@ -26,8 +26,8 @@ export type TableRenderDetailRowFnParam = {
2626
hidden: boolean;
2727
height: number;
2828
rowFixed: FixedPosition;
29-
onMouseEnter: VoidFunction;
30-
onMouseLeave: VoidFunction;
29+
onMouseEnter: (event: React.MouseEvent<HTMLElement>) => void;
30+
onMouseLeave: (event: React.MouseEvent<HTMLElement>) => void;
3131
};
3232
export type TableRenderCellFn = (param: TableRenderCellFnParam) => Renderable;
3333
export type TableRenderDetailRowFn = (

source/src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableCellTypes.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ export interface InfiniteTableColumnCellProps<T>
5959
rowDetailState: false | 'collapsed' | 'expanded';
6060
columnsMap: Map<string, InfiniteTableComputedColumn<T>>;
6161
fieldsToColumn: Map<keyof T, InfiniteTableComputedColumn<T>>;
62-
onMouseEnter?: (event: React.MouseEvent) => void;
63-
onMouseLeave?: (event: React.MouseEvent) => void;
62+
onMouseEnter?: (event: React.MouseEvent<HTMLElement>) => void;
63+
onMouseLeave?: (event: React.MouseEvent<HTMLElement>) => void;
6464
onRowMouseEnter?: InfiniteTableProps<T>['onRowMouseEnter'];
6565
onRowMouseLeave?: InfiniteTableProps<T>['onRowMouseLeave'];
6666
showZebraRows: boolean;

source/src/components/InfiniteTable/components/InfiniteTableRow/InfiniteTableColumnCell.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ function InfiniteTableColumnCellFn<T>(props: InfiniteTableColumnCellProps<T>) {
313313
rowIndex,
314314
} as InfiniteTableRowContext<T>;
315315
onRowMouseEnter(rowContext, event);
316-
onMouseEnter(event);
316+
onMouseEnter(event as React.MouseEvent<HTMLElement>);
317317
}
318318
: onMouseEnter;
319319

@@ -326,7 +326,7 @@ function InfiniteTableColumnCellFn<T>(props: InfiniteTableColumnCellProps<T>) {
326326
rowInfo,
327327
} as InfiniteTableRowContext<T>;
328328
onRowMouseLeave(rowContext, event);
329-
onMouseLeave(event);
329+
onMouseLeave(event as React.MouseEvent<HTMLElement>);
330330
}
331331
: onMouseLeave;
332332

www/content/eula.page.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ In these Terms, where the context so admits, the following words and expressions
403403
<td>
404404
means the support services, to be provided by the Licensor in respect of
405405
the Software (including the provision of Updates), as set out in the
406-
Support Schedule; and
406+
Support Schedule
407407
</td>
408408
</tr>
409409
</tbody>

0 commit comments

Comments
 (0)