@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.js
CHANGED
|
@@ -550,6 +550,8 @@ function RowDragCell({ row, table }) {
|
|
|
550
550
|
});
|
|
551
551
|
if (pinned) return null;
|
|
552
552
|
const lifted = rowReorderKeyboard?.active(row.id) === true;
|
|
553
|
+
const activeRow = table.options.meta?.ledger?.activeRow;
|
|
554
|
+
const tabStop = activeRow?.enabled !== true || activeRow.id === row.id;
|
|
553
555
|
const handleKeyDown = (event) => {
|
|
554
556
|
const keyboard = rowReorderKeyboard;
|
|
555
557
|
if (!keyboard || !orderable) return;
|
|
@@ -601,10 +603,14 @@ function RowDragCell({ row, table }) {
|
|
|
601
603
|
color: "gray",
|
|
602
604
|
size: SIZES[size].control,
|
|
603
605
|
style: { cursor: orderable ? "grab" : "default" },
|
|
606
|
+
tabIndex: tabStop ? void 0 : -1,
|
|
604
607
|
variant: "subtle",
|
|
605
608
|
onBlur: () => {
|
|
606
609
|
if (lifted) rowReorderKeyboard?.cancel();
|
|
607
610
|
},
|
|
611
|
+
onFocus: () => {
|
|
612
|
+
if (activeRow?.enabled === true && activeRow.id !== row.id && activeRow.canActivate(row)) activeRow.set(row.id);
|
|
613
|
+
},
|
|
608
614
|
onKeyDown: handleKeyDown,
|
|
609
615
|
children: /* @__PURE__ */ jsx(icons.reorderRow, { size: SIZES[size].glyph })
|
|
610
616
|
})
|