@almoamendev/ngx-md3 0.3.6 → 0.3.7
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.
|
@@ -1126,6 +1126,9 @@ class Button {
|
|
|
1126
1126
|
if (this.isSelected() === null) {
|
|
1127
1127
|
return;
|
|
1128
1128
|
}
|
|
1129
|
+
if (this.context?.buttonContextSelection?.() === 'single') {
|
|
1130
|
+
return;
|
|
1131
|
+
}
|
|
1129
1132
|
this.isSelected.update((value) => {
|
|
1130
1133
|
return !value;
|
|
1131
1134
|
});
|
|
@@ -1244,6 +1247,9 @@ class IconButton {
|
|
|
1244
1247
|
if (this.isSelected() === null) {
|
|
1245
1248
|
return;
|
|
1246
1249
|
}
|
|
1250
|
+
if (this.context?.buttonContextSelection?.() === 'single') {
|
|
1251
|
+
return;
|
|
1252
|
+
}
|
|
1247
1253
|
this.isSelected.update((value) => {
|
|
1248
1254
|
return !value;
|
|
1249
1255
|
});
|
|
@@ -1404,10 +1410,11 @@ class ButtonGroup {
|
|
|
1404
1410
|
return;
|
|
1405
1411
|
}
|
|
1406
1412
|
const selectedItem = this.findEventButton(event);
|
|
1407
|
-
if (selectedItem
|
|
1408
|
-
|
|
1413
|
+
if (!selectedItem) {
|
|
1414
|
+
return;
|
|
1409
1415
|
}
|
|
1410
|
-
|
|
1416
|
+
this.clearOtherSelections(selectedItem);
|
|
1417
|
+
selectedItem.isSelected.set(true);
|
|
1411
1418
|
}
|
|
1412
1419
|
buttonSize = input('small', { ...(ngDevMode ? { debugName: "buttonSize" } : /* istanbul ignore next */ {}), alias: 'button-size' });
|
|
1413
1420
|
groupType = input('standard', { ...(ngDevMode ? { debugName: "groupType" } : /* istanbul ignore next */ {}), alias: 'group-type' });
|
|
@@ -1416,6 +1423,7 @@ class ButtonGroup {
|
|
|
1416
1423
|
iconButtons = contentChildren(IconButton, { ...(ngDevMode ? { debugName: "iconButtons" } : /* istanbul ignore next */ {}), descendants: true });
|
|
1417
1424
|
// context values
|
|
1418
1425
|
buttonContextSize = this.buttonSize;
|
|
1426
|
+
buttonContextSelection = this.groupSelection;
|
|
1419
1427
|
constructor(el) {
|
|
1420
1428
|
this.el = el;
|
|
1421
1429
|
effect((onCleanup) => {
|