@nys-cui/cui-formpill 0.2.2 → 0.2.3

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 CHANGED
@@ -6,7 +6,7 @@
6
6
  },
7
7
  "main": "./dist/js/cui-formpill.js",
8
8
  "type": "module",
9
- "version": "0.2.2",
9
+ "version": "0.2.3",
10
10
  "scripts": {
11
11
  "clean": "rm -rf ./dist",
12
12
  "build": "npm run clean && cui --dep",
@@ -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
  }
@@ -892,6 +892,9 @@ class CUI_FORMPILL extends HTMLElement {
892
892
  this.dValueField.setAttribute('componentKey', 'contextHeaderValue');
893
893
  dPopoverBody.insertBefore(this.dValueField, dPopoverFooter);
894
894
  }
895
+ if (controls.value.validation) {
896
+ this.dValueField.setAttribute('validation', controls.value.validation);
897
+ }
895
898
 
896
899
  } else if (controls.value && controls.value.options) {
897
900
  this.dValueField = document.createElement('cui-listbox');
@@ -918,6 +921,10 @@ class CUI_FORMPILL extends HTMLElement {
918
921
  this.field = document.createElement('cui-date');
919
922
  }
920
923
 
924
+ if(controls.value.control[i].validation){
925
+ this.field.setAttribute('validation', controls.value.control[i].validation)
926
+ }
927
+
921
928
  this.field.setState({ 'label': controls.value.control[i].label })
922
929
  if (controls.value.control[i].required) {
923
930
  this.field.setAttribute('required', '');