@coldsmirk/ledger-mantine 0.12.3 → 0.12.4
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/index.cjs +6 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -574,6 +574,8 @@ function RowDragCell({ row, table }) {
|
|
|
574
574
|
});
|
|
575
575
|
if (pinned) return null;
|
|
576
576
|
const lifted = rowReorderKeyboard?.active(row.id) === true;
|
|
577
|
+
const activeRow = table.options.meta?.ledger?.activeRow;
|
|
578
|
+
const tabStop = activeRow?.enabled !== true || activeRow.id === row.id;
|
|
577
579
|
const handleKeyDown = (event) => {
|
|
578
580
|
const keyboard = rowReorderKeyboard;
|
|
579
581
|
if (!keyboard || !orderable) return;
|
|
@@ -625,10 +627,14 @@ function RowDragCell({ row, table }) {
|
|
|
625
627
|
color: "gray",
|
|
626
628
|
size: SIZES[size].control,
|
|
627
629
|
style: { cursor: orderable ? "grab" : "default" },
|
|
630
|
+
tabIndex: tabStop ? void 0 : -1,
|
|
628
631
|
variant: "subtle",
|
|
629
632
|
onBlur: () => {
|
|
630
633
|
if (lifted) rowReorderKeyboard?.cancel();
|
|
631
634
|
},
|
|
635
|
+
onFocus: () => {
|
|
636
|
+
if (activeRow?.enabled === true && activeRow.id !== row.id && activeRow.canActivate(row)) activeRow.set(row.id);
|
|
637
|
+
},
|
|
632
638
|
onKeyDown: handleKeyDown,
|
|
633
639
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(icons.reorderRow, { size: SIZES[size].glyph })
|
|
634
640
|
})
|