@acorex/components 16.18.24 → 16.18.25
Sign up to get free protection for your applications and to get access to all the features.
- package/esm2022/lib/form-group/form-group.component.mjs +20 -2
- package/esm2022/lib/selectbox/selectbox.component.mjs +2 -1
- package/fesm2022/acorex-components.mjs +20 -1
- package/fesm2022/acorex-components.mjs.map +1 -1
- package/lib/form-group/form-group.component.d.ts +1 -0
- package/lib/selectbox/selectbox.component.d.ts +1 -0
- package/package.json +1 -1
@@ -6190,21 +6190,39 @@ class AXFormGroupComponent extends AXBaseComponent {
|
|
6190
6190
|
}
|
6191
6191
|
const input = this.component.ref.nativeElement.querySelector('input');
|
6192
6192
|
const textArea = this.component.ref.nativeElement.querySelector('textarea');
|
6193
|
+
if (this.component.name === 'selectBox') {
|
6194
|
+
const selectBox = this.component;
|
6195
|
+
selectBox.selectedItemsChange.subscribe((e) => {
|
6196
|
+
if (e.length > 0 && this.labelMode() === 'float') {
|
6197
|
+
this.isFloatActive.set(true);
|
6198
|
+
this.labelMode.set('over');
|
6199
|
+
}
|
6200
|
+
else {
|
6201
|
+
this.labelMode.set('float');
|
6202
|
+
this.isFloatActive.set(false);
|
6203
|
+
}
|
6204
|
+
});
|
6205
|
+
}
|
6193
6206
|
if (input) {
|
6207
|
+
input.addEventListener('input', this.checkForValue.bind(this));
|
6194
6208
|
input.addEventListener('focus', this.handleFocus.bind(this));
|
6195
6209
|
input.addEventListener('blur', this.handeleBlur.bind(this));
|
6196
6210
|
}
|
6197
6211
|
if (textArea) {
|
6212
|
+
textArea.addEventListener('input', this.checkForValue.bind(this));
|
6198
6213
|
textArea.addEventListener('focus', this.handleFocus.bind(this));
|
6199
6214
|
textArea.addEventListener('blur', this.handeleBlur.bind(this));
|
6200
6215
|
}
|
6216
|
+
this.checkForValue();
|
6217
|
+
});
|
6218
|
+
checkForValue() {
|
6201
6219
|
if ((this.component.value ||
|
6202
6220
|
this.component.selectedItems?.length > 0) &&
|
6203
6221
|
this.labelMode() === 'float') {
|
6204
6222
|
this.labelMode.set('over');
|
6205
6223
|
this.isFloatActive.set(true);
|
6206
6224
|
}
|
6207
|
-
}
|
6225
|
+
}
|
6208
6226
|
handleFocus() {
|
6209
6227
|
if (this.labelMode() === 'float') {
|
6210
6228
|
this.isFloatActive.set(true);
|
@@ -8686,6 +8704,7 @@ class AXSelectBoxComponent extends AXValidatableComponent {
|
|
8686
8704
|
cdr;
|
8687
8705
|
ref;
|
8688
8706
|
zone;
|
8707
|
+
name = 'selectBox';
|
8689
8708
|
showDropDownButton = true;
|
8690
8709
|
rowTemplate;
|
8691
8710
|
rowInputTemplate;
|