@masterteam/components 0.0.352 → 0.0.353
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/fesm2022/masterteam-components-table.mjs +10 -7
- package/fesm2022/masterteam-components-table.mjs.map +1 -1
- package/fesm2022/masterteam-components-text-field.mjs +9 -4
- package/fesm2022/masterteam-components-text-field.mjs.map +1 -1
- package/package.json +1 -1
- package/types/masterteam-components-table.d.ts +11 -3
|
@@ -2890,17 +2890,20 @@ class Table {
|
|
|
2890
2890
|
];
|
|
2891
2891
|
}
|
|
2892
2892
|
/**
|
|
2893
|
-
*
|
|
2894
|
-
*
|
|
2895
|
-
*
|
|
2893
|
+
* Whether a divider goes above this item: at the first destructive item, or
|
|
2894
|
+
* under an item flagged `dividerAfter`. The divider is rendered above an
|
|
2895
|
+
* item rather than below the previous one so a menu never opens or ends
|
|
2896
|
+
* with a stray rule (e.g. one that is *only* destructive).
|
|
2896
2897
|
*/
|
|
2897
2898
|
isFirstDestructiveAction(row, index) {
|
|
2898
2899
|
const menu = this.getMenuRowActions(row);
|
|
2899
2900
|
const action = menu[index];
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2901
|
+
if (index === 0 || !action) {
|
|
2902
|
+
return false;
|
|
2903
|
+
}
|
|
2904
|
+
return (!!menu[index - 1]?.dividerAfter ||
|
|
2905
|
+
(Table.isDestructiveAction(action) &&
|
|
2906
|
+
!Table.isDestructiveAction(menu[index - 1])));
|
|
2904
2907
|
}
|
|
2905
2908
|
/** Deleting, or anything the caller flagged `danger`. */
|
|
2906
2909
|
static isDestructiveAction(action) {
|