cx 24.0.3 → 24.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -54,11 +54,11 @@ interface GridColumnDropEvent extends DragEvent {
54
54
 
55
55
  interface GridGroupingKey {
56
56
  [key: string]:
57
- | Prop<any>
58
- | {
59
- value: Prop<any>;
60
- direction: SortDirection;
61
- };
57
+ | Prop<any>
58
+ | {
59
+ value: Prop<any>;
60
+ direction: SortDirection;
61
+ };
62
62
  }
63
63
 
64
64
  type GridColumnAlignment = "left" | "right" | "center";
@@ -298,6 +298,9 @@ interface GridProps<T = unknown> extends StyledContainerProps {
298
298
  /** Parameters that affect filtering. */
299
299
  filterParams?: StructuredProp;
300
300
 
301
+ /** Callback function to be executed when a row is right-clicked. */
302
+ onRowContextMenu?: string | ((e: React.SyntheticEvent<any>, instance: Instance) => void);
303
+
301
304
  /** Callback to create a filter function for given filter params. */
302
305
  onCreateFilter?: (filterParams: any, instance?: Instance) => (record: T) => boolean;
303
306
 
@@ -316,7 +319,7 @@ interface GridProps<T = unknown> extends StyledContainerProps {
316
319
  sortField?: string;
317
320
  sortDirection?: string;
318
321
  },
319
- instance?: Instance
322
+ instance?: Instance,
320
323
  ) => FetchRecordsResult | Promise<FetchRecordsResult>;
321
324
 
322
325
  /** Callback function to be executed when a row is double-clicked. */
@@ -349,7 +352,7 @@ interface GridProps<T = unknown> extends StyledContainerProps {
349
352
  /** Callback to create a function that can be used to check whether a record is selectable. */
350
353
  onCreateIsRecordSelectable?: (
351
354
  params: any,
352
- instance: Instance
355
+ instance: Instance,
353
356
  ) => (record: T, options?: { range?: boolean; toggle?: boolean }) => boolean;
354
357
 
355
358
  /** Parameters whose change will cause scroll to be reset. */
@@ -404,4 +407,4 @@ interface GridCellEditInfo<T> extends GridCellInfo {
404
407
  newData: T;
405
408
  }
406
409
 
407
- export class Grid<T = unknown> extends Widget<GridProps<T>> { }
410
+ export class Grid<T = unknown> extends Widget<GridProps<T>> {}