sellmate-design-system-react 9.0.0-beta.76 → 9.0.0-beta.77
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.
- package/dist/components/STable/README.md +1 -0
- package/dist/components/STable/STable.d.ts +10 -0
- package/dist/index.cjs +8 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -1
- package/dist/index.js.map +1 -1
- package/dist/llms-full.txt +1 -0
- package/package.json +1 -1
|
@@ -55,6 +55,7 @@
|
|
|
55
55
|
| `onVirtualUpdate` | `(range: { from: number; to: number }) => void` | |
|
|
56
56
|
| `onVirtualReachEnd` | `(info: { from: number; to: number; rowCount: number; threshold: number; }) =>…` | |
|
|
57
57
|
| `onRowClick` | `(row: TRow) => void` | 행 클릭 |
|
|
58
|
+
| `onRowDoubleClick` | `(row: TRow) => void` | 행 더블클릭. 목록에서 상세를 여는 것처럼 **한 번 누르는 것과 다른 일**을 걸 때 쓴다. 더블클릭도 클릭 두 번이라 `onRowClick` 과 함께 주면 **`onRowClick` 이 두 번 먼저 울린다** — 둘을 함께 쓰려면 `onRowClick` 은 두 번 울려도 결과가 같은 일(행 강조 등)이어야 한다. 선택 체크박스 열과 셀 안의 버튼·링크·입력 위에서 한 더블클릭은 행 더블클릭이 아니다 — 체크박스를 빠르게 두 번 누르거나 입력의 글자를 더블클릭으로 고르다 상세가 열리지 않게 한다. |
|
|
58
59
|
|
|
59
60
|
#### Methods (ref)
|
|
60
61
|
|
|
@@ -400,6 +400,16 @@ export interface STableProps<TRow extends SRow = SRow> {
|
|
|
400
400
|
tableId?: string;
|
|
401
401
|
/** 행 클릭 */
|
|
402
402
|
onRowClick?: (row: TRow) => void;
|
|
403
|
+
/**
|
|
404
|
+
* 행 더블클릭. 목록에서 상세를 여는 것처럼 **한 번 누르는 것과 다른 일**을 걸 때 쓴다.
|
|
405
|
+
*
|
|
406
|
+
* 더블클릭도 클릭 두 번이라 `onRowClick` 과 함께 주면 **`onRowClick` 이 두 번 먼저 울린다** —
|
|
407
|
+
* 둘을 함께 쓰려면 `onRowClick` 은 두 번 울려도 결과가 같은 일(행 강조 등)이어야 한다.
|
|
408
|
+
*
|
|
409
|
+
* 선택 체크박스 열과 셀 안의 버튼·링크·입력 위에서 한 더블클릭은 행 더블클릭이 아니다 —
|
|
410
|
+
* 체크박스를 빠르게 두 번 누르거나 입력의 글자를 더블클릭으로 고르다 상세가 열리지 않게 한다.
|
|
411
|
+
*/
|
|
412
|
+
onRowDoubleClick?: (row: TRow) => void;
|
|
403
413
|
className?: string;
|
|
404
414
|
style?: CSSProperties;
|
|
405
415
|
}
|
package/dist/index.cjs
CHANGED
|
@@ -16614,6 +16614,7 @@ var STableImpl = /* @__PURE__ */ react.forwardRef(function STable({
|
|
|
16614
16614
|
onVirtualReachEnd,
|
|
16615
16615
|
tableId,
|
|
16616
16616
|
onRowClick,
|
|
16617
|
+
onRowDoubleClick,
|
|
16617
16618
|
className,
|
|
16618
16619
|
style
|
|
16619
16620
|
}, ref) {
|
|
@@ -17466,13 +17467,18 @@ var STableImpl = /* @__PURE__ */ react.forwardRef(function STable({
|
|
|
17466
17467
|
{
|
|
17467
17468
|
"data-row-index": rowIndex,
|
|
17468
17469
|
onClick: () => onRowClick?.(row),
|
|
17470
|
+
onDoubleClick: onRowDoubleClick ? (event) => {
|
|
17471
|
+
const target = event.target;
|
|
17472
|
+
if (target.closest(ROW_INTERACTIVE_SELECTOR)) return;
|
|
17473
|
+
onRowDoubleClick(row);
|
|
17474
|
+
} : void 0,
|
|
17469
17475
|
onMouseDown: dragSelectOn ? (event) => startDragSelect(rowIndex, event) : void 0,
|
|
17470
17476
|
onMouseEnter: dragSelectOn ? () => extendDragSelect(rowIndex) : void 0,
|
|
17471
17477
|
onContextMenu: contextMenuOn ? (event) => openContextMenu(row, event) : void 0,
|
|
17472
17478
|
className: cn(
|
|
17473
17479
|
"group/table-row",
|
|
17474
17480
|
rowHover && "hover:bg-[var(--color-grey-05)]",
|
|
17475
|
-
onRowClick && "cursor-pointer",
|
|
17481
|
+
(onRowClick || onRowDoubleClick) && "cursor-pointer",
|
|
17476
17482
|
dragSelectOn && "select-none"
|
|
17477
17483
|
),
|
|
17478
17484
|
style: { height: virtualScroll ? effectiveRowHeight : rowH },
|
|
@@ -17495,6 +17501,7 @@ var STableImpl = /* @__PURE__ */ react.forwardRef(function STable({
|
|
|
17495
17501
|
background: rowLocked ? LOCKED_BG : void 0
|
|
17496
17502
|
},
|
|
17497
17503
|
onClick: (e) => e.stopPropagation(),
|
|
17504
|
+
onDoubleClick: (e) => e.stopPropagation(),
|
|
17498
17505
|
onClickCapture: (e) => {
|
|
17499
17506
|
shiftPressedRef.current = e.shiftKey;
|
|
17500
17507
|
if (e.shiftKey) window.getSelection()?.removeAllRanges();
|