mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-09 20:29:36 +02:00
Add table context
This commit is contained in:
@@ -186,6 +186,10 @@ export const useVirtualTable = <TResponse, TFilter>({
|
|||||||
|
|
||||||
const onCellContextMenu = useHandleTableContextMenu(itemType, contextMenu);
|
const onCellContextMenu = useHandleTableContextMenu(itemType, contextMenu);
|
||||||
|
|
||||||
|
const context = {
|
||||||
|
onCellContextMenu,
|
||||||
|
};
|
||||||
|
|
||||||
const defaultTableProps: Partial<VirtualTableProps> = useMemo(() => {
|
const defaultTableProps: Partial<VirtualTableProps> = useMemo(() => {
|
||||||
return {
|
return {
|
||||||
alwaysShowHorizontalScroll: true,
|
alwaysShowHorizontalScroll: true,
|
||||||
@@ -241,6 +245,7 @@ export const useVirtualTable = <TResponse, TFilter>({
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
columnDefs,
|
columnDefs,
|
||||||
|
context,
|
||||||
defaultColumnDefs,
|
defaultColumnDefs,
|
||||||
onBodyScrollEnd,
|
onBodyScrollEnd,
|
||||||
onCellContextMenu,
|
onCellContextMenu,
|
||||||
|
|||||||
Reference in New Issue
Block a user