@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.
package/dist/index.esm.js CHANGED
@@ -1768,6 +1768,21 @@ const proxyInputMixin =
1768
1768
  this.setAttribute('error-message', this.validationMessage);
1769
1769
  }
1770
1770
 
1771
+ // We do not want to show the default validity report tooltip
1772
+ // So we are overriding the reportValidity fn to show the input's error message
1773
+ reportValidity = () => {
1774
+ if (!this.checkValidity()) {
1775
+ this.setAttribute('invalid', 'true');
1776
+ this.#handleErrorMessage();
1777
+ this.focus();
1778
+ }
1779
+ };
1780
+
1781
+ // we are keeping also the default reportValidity because there are some components that still using it
1782
+ defaultReportValidity() {
1783
+ return super.reportValidity();
1784
+ }
1785
+
1771
1786
  init() {
1772
1787
  super.init?.();
1773
1788
 
@@ -6681,6 +6696,12 @@ class RawUploadFile extends BaseInputClass {
6681
6696
  };
6682
6697
  }
6683
6698
 
6699
+ // this is a temp solution,
6700
+ // we should show the input error message like we have in all other inputs
6701
+ reportValidity() {
6702
+ this.defaultReportValidity();
6703
+ }
6704
+
6684
6705
  getValidity() {
6685
6706
  if (this.isRequired && !this.value) {
6686
6707
  return { valueMissing: true };