@nys-cui/cui-formpill 0.2.2 → 0.2.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/package.json +1 -1
- package/src/cui-formpill.js +20 -2
package/package.json
CHANGED
package/src/cui-formpill.js
CHANGED
@@ -412,7 +412,7 @@ class CUI_FORMPILL extends HTMLElement {
|
|
412
412
|
this.addPillfromJSON();
|
413
413
|
|
414
414
|
} else if (reset === true) {
|
415
|
-
if(this._state.configData?.filterCriteria?.loadedPills){
|
415
|
+
if (this._state.configData?.filterCriteria?.loadedPills) {
|
416
416
|
|
417
417
|
this._state.configData.filterCriteria.loadedPills = []
|
418
418
|
}
|
@@ -820,11 +820,22 @@ class CUI_FORMPILL extends HTMLElement {
|
|
820
820
|
this.dValueField = document.createElement('cui-listbox');
|
821
821
|
this.dValueField.setState({ 'items': controls.value.options, 'label': `${(controls.fieldLabel) ? controls.fieldLabel : 'Value'}` });
|
822
822
|
|
823
|
+
|
824
|
+
if (controls.value.multiple) {
|
825
|
+
this.dValueField.setAttribute('multiple', true)
|
826
|
+
}
|
827
|
+
if (controls.value.codedesc) {
|
828
|
+
this.dValueField.setAttribute('codedesc', true)
|
829
|
+
}
|
830
|
+
if (controls.value.search) {
|
831
|
+
this.dValueField.setAttribute('search', true)
|
832
|
+
}
|
833
|
+
|
823
834
|
if (pill._state.sValue2.indexOf(',') == -1) {
|
824
835
|
this.dValueField.setAttribute('value', pill._state.sValue2)
|
825
836
|
}
|
826
837
|
else {
|
827
|
-
|
838
|
+
|
828
839
|
let aValues = pill._state.sValue2.split(',');
|
829
840
|
this.dValueField.setAttribute('value', aValues)
|
830
841
|
}
|
@@ -892,6 +903,9 @@ class CUI_FORMPILL extends HTMLElement {
|
|
892
903
|
this.dValueField.setAttribute('componentKey', 'contextHeaderValue');
|
893
904
|
dPopoverBody.insertBefore(this.dValueField, dPopoverFooter);
|
894
905
|
}
|
906
|
+
if (controls.value.validation) {
|
907
|
+
this.dValueField.setAttribute('validation', controls.value.validation);
|
908
|
+
}
|
895
909
|
|
896
910
|
} else if (controls.value && controls.value.options) {
|
897
911
|
this.dValueField = document.createElement('cui-listbox');
|
@@ -918,6 +932,10 @@ class CUI_FORMPILL extends HTMLElement {
|
|
918
932
|
this.field = document.createElement('cui-date');
|
919
933
|
}
|
920
934
|
|
935
|
+
if (controls.value.control[i].validation) {
|
936
|
+
this.field.setAttribute('validation', controls.value.control[i].validation)
|
937
|
+
}
|
938
|
+
|
921
939
|
this.field.setState({ 'label': controls.value.control[i].label })
|
922
940
|
if (controls.value.control[i].required) {
|
923
941
|
this.field.setAttribute('required', '');
|