@energycap/components 0.27.3-ECAPID-377-Implement-Sidebar.20220121-0740 → 0.27.3-ECAPID-377-Implement-Sidebar.20220125-1124
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/bundles/energycap-components.umd.js +15 -2
- package/bundles/energycap-components.umd.js.map +1 -1
- package/bundles/energycap-components.umd.min.js +1 -1
- package/bundles/energycap-components.umd.min.js.map +1 -1
- package/energycap-components.metadata.json +1 -1
- package/esm2015/lib/controls/menu/menu.component.js +16 -3
- package/fesm2015/energycap-components.js +15 -2
- package/fesm2015/energycap-components.js.map +1 -1
- package/lib/controls/menu/menu.component.d.ts +6 -0
- package/package.json +1 -1
|
@@ -2653,6 +2653,12 @@
|
|
|
2653
2653
|
* Item currently highlighted by keyboard navigation
|
|
2654
2654
|
*/
|
|
2655
2655
|
this.highlightedItem = null;
|
|
2656
|
+
/**
|
|
2657
|
+
* Tells the menu to maintain the selected/lastSelected item. Turning this off is useful for
|
|
2658
|
+
* action type menus that are displayed on the screen at all times and you do not
|
|
2659
|
+
* want the item to be selected when clicked.
|
|
2660
|
+
*/
|
|
2661
|
+
this.maintainSelectedItem = true;
|
|
2656
2662
|
/**
|
|
2657
2663
|
* Emitted when `selected` is changed. Emits the referenced object.
|
|
2658
2664
|
*
|
|
@@ -2755,8 +2761,14 @@
|
|
|
2755
2761
|
else {
|
|
2756
2762
|
this.onSelection(item);
|
|
2757
2763
|
}
|
|
2758
|
-
this.
|
|
2759
|
-
|
|
2764
|
+
if (this.maintainSelectedItem) {
|
|
2765
|
+
this.selected = item;
|
|
2766
|
+
this.lastSelected = item;
|
|
2767
|
+
}
|
|
2768
|
+
else {
|
|
2769
|
+
this.selected = null;
|
|
2770
|
+
this.lastSelected = null;
|
|
2771
|
+
}
|
|
2760
2772
|
}
|
|
2761
2773
|
};
|
|
2762
2774
|
/**
|
|
@@ -3000,6 +3012,7 @@
|
|
|
3000
3012
|
noDataText: [{ type: i0.Input }],
|
|
3001
3013
|
enableKeyNav: [{ type: i0.Input }],
|
|
3002
3014
|
highlightedItem: [{ type: i0.Input }],
|
|
3015
|
+
maintainSelectedItem: [{ type: i0.Input }],
|
|
3003
3016
|
selectedChanged: [{ type: i0.Output }],
|
|
3004
3017
|
menuClosed: [{ type: i0.Output }],
|
|
3005
3018
|
labelTemplate: [{ type: i0.ViewChild, args: ['label', { static: true },] }],
|