Add table context
This commit is contained in:
parent
b8dfbf9d49
commit
919016ca5a
1 changed files with 5 additions and 0 deletions
|
@ -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 a new issue