@alaarab/ogrid-react-fluent 2.0.15 → 2.0.16

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.
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React, { useMemo, useEffect, useState, useRef } from 'react';
3
3
  import { createPortal } from 'react-dom';
4
- import { getColumnHeaderMenuItems } from '@alaarab/ogrid-core';
4
+ import { getColumnHeaderMenuItems } from '@alaarab/ogrid-react';
5
5
  import styles from './ColumnHeaderMenu.module.css';
6
6
  /**
7
7
  * Column header dropdown menu for pin/sort/autosize actions.
@@ -84,7 +84,7 @@ function DataGridTableInner(props) {
84
84
  const rowId = getRowId(item);
85
85
  let content;
86
86
  if (descriptor.mode === 'editing-inline') {
87
- content = _jsx(InlineCellEditor, { ...buildInlineEditorProps(item, col, descriptor, editCallbacks) });
87
+ content = (_jsx("div", { className: styles.editingCellContent, children: _jsx(InlineCellEditor, { ...buildInlineEditorProps(item, col, descriptor, editCallbacks) }) }));
88
88
  }
89
89
  else if (descriptor.mode === 'editing-popover' && typeof col.cellEditor === 'function') {
90
90
  const editorProps = buildPopoverEditorProps(item, col, descriptor, pendingEditorValueRef.current, editCallbacks);
@@ -192,6 +192,21 @@
192
192
  background: var(--ogrid-active-cell-bg, rgba(0, 0, 0, 0.02));
193
193
  }
194
194
 
195
+ .editingCellContent {
196
+ width: 100%;
197
+ height: 100%;
198
+ display: flex;
199
+ align-items: center;
200
+ box-sizing: border-box;
201
+ outline: 2px solid var(--ogrid-selection-color, #217346);
202
+ outline-offset: -1px;
203
+ z-index: 2;
204
+ position: relative;
205
+ background: var(--ogrid-bg, #fff);
206
+ overflow: visible;
207
+ padding: 0;
208
+ }
209
+
195
210
  .cellInRange {
196
211
  background: var(--ogrid-range-bg, rgba(33, 115, 70, 0.12)) !important;
197
212
  }
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Select, Checkbox } from '@fluentui/react-components';
3
- import { BaseInlineCellEditor, editorWrapperStyle } from '@alaarab/ogrid-react';
2
+ import { Checkbox } from '@fluentui/react-components';
3
+ import { BaseInlineCellEditor } from '@alaarab/ogrid-react';
4
4
  export function InlineCellEditor(props) {
5
- return (_jsx(BaseInlineCellEditor, { ...props, renderCheckbox: (checked, onCommit, onCancel) => (_jsx(Checkbox, { checked: checked, onChange: (_, data) => onCommit(!!data.checked), onKeyDown: (e) => e.key === 'Escape' && (e.preventDefault(), onCancel()) })), renderSelect: (value, values, onCommit, onCancel) => (_jsx("div", { style: editorWrapperStyle, children: _jsx(Select, { value: value !== null && value !== undefined ? String(value) : '', onChange: (_, data) => onCommit(data.value), onKeyDown: (e) => e.key === 'Escape' && (e.preventDefault(), onCancel()), children: values.map((v) => (_jsx("option", { value: String(v), children: String(v) }, String(v)))) }) })) }));
5
+ return (_jsx(BaseInlineCellEditor, { ...props, renderCheckbox: (checked, onCommit, onCancel) => (_jsx(Checkbox, { checked: checked, onChange: (_, data) => onCommit(!!data.checked), onKeyDown: (e) => e.key === 'Escape' && (e.preventDefault(), onCancel()) })) }));
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alaarab/ogrid-react-fluent",
3
- "version": "2.0.15",
3
+ "version": "2.0.16",
4
4
  "description": "OGrid React Fluent implementation – DataGrid-powered data table with sorting, filtering, pagination, column chooser, and CSV export.",
5
5
  "main": "dist/esm/index.js",
6
6
  "module": "dist/esm/index.js",