@descope/web-components-ui 1.0.190 → 1.0.191

Sign up to get free protection for your applications and to get access to all the features.
@@ -2090,6 +2090,21 @@ const proxyInputMixin =
2090
2090
  this.setAttribute('error-message', this.validationMessage);
2091
2091
  }
2092
2092
 
2093
+ // We do not want to show the default validity report tooltip
2094
+ // So we are overriding the reportValidity fn to show the input's error message
2095
+ reportValidity = () => {
2096
+ if (!this.checkValidity()) {
2097
+ this.setAttribute('invalid', 'true');
2098
+ this.#handleErrorMessage();
2099
+ this.focus();
2100
+ }
2101
+ };
2102
+
2103
+ // we are keeping also the default reportValidity because there are some components that still using it
2104
+ defaultReportValidity() {
2105
+ return super.reportValidity();
2106
+ }
2107
+
2093
2108
  init() {
2094
2109
  super.init?.();
2095
2110
 
@@ -7026,6 +7041,12 @@ class RawUploadFile extends BaseInputClass {
7026
7041
  };
7027
7042
  }
7028
7043
 
7044
+ // this is a temp solution,
7045
+ // we should show the input error message like we have in all other inputs
7046
+ reportValidity() {
7047
+ this.defaultReportValidity();
7048
+ }
7049
+
7029
7050
  getValidity() {
7030
7051
  if (this.isRequired && !this.value) {
7031
7052
  return { valueMissing: true };