@linzjs/step-ag-grid 17.4.10 → 17.5.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.
@@ -2323,7 +2323,7 @@ const useGridContextMenu = ({ contextMenuSelectRow, contextMenu: ContextMenu, })
2323
2323
  /**
2324
2324
  * Wrapper for AgGrid to add commonly used functionality.
2325
2325
  */
2326
- const Grid = ({ "data-testid": dataTestId, rowSelection = "multiple", suppressColumnVirtualization = true, theme = "ag-theme-step-default", sizeColumns = "auto", selectColumnPinned = null, contextMenuSelectRow = false, rowHeight = theme === "ag-theme-step-default" ? 40 : theme === "ag-theme-step-compact" ? 36 : undefined, ...params }) => {
2326
+ const Grid = ({ "data-testid": dataTestId, rowSelection = "multiple", suppressColumnVirtualization = true, theme = "ag-theme-step-default", sizeColumns = "auto", selectColumnPinned = null, contextMenuSelectRow = false, singleClickEdit = false, rowHeight = theme === "ag-theme-step-default" ? 40 : theme === "ag-theme-step-compact" ? 36 : undefined, ...params }) => {
2327
2327
  const { gridReady, setApis, ensureRowVisible, getFirstRowId, selectRowsById, focusByRowById, ensureSelectedRowIsVisible, autoSizeColumns, sizeColumnsToFit, externallySelectedItemsAreInSync, setExternallySelectedItemsAreInSync, isExternalFilterPresent, doesExternalFilterPass, setOnCellEditingComplete, getColDef, } = useContext(GridContext);
2328
2328
  const { checkUpdating, updatedDep, updatingCols } = useContext(GridUpdatingContext);
2329
2329
  const { prePopupOps } = useContext(GridContext);
@@ -2627,10 +2627,10 @@ const Grid = ({ "data-testid": dataTestId, rowSelection = "multiple", suppressCo
2627
2627
  * Handle single click edits
2628
2628
  */
2629
2629
  const onCellClicked = useCallback((event) => {
2630
- if (event.colDef?.cellRendererParams?.singleClickEdit) {
2630
+ if (event.colDef?.cellRendererParams?.singleClickEdit ?? singleClickEdit) {
2631
2631
  startCellEditing(event);
2632
2632
  }
2633
- }, [startCellEditing]);
2633
+ }, [singleClickEdit, startCellEditing]);
2634
2634
  /**
2635
2635
  * If cell has an edit action invoke it (if editable)
2636
2636
  */