From 34573fccb8040e7407101f3110e5b9cd88c1499d Mon Sep 17 00:00:00 2001 From: Daniel Date: Sun, 17 Nov 2024 15:58:41 -0500 Subject: [PATCH] Fixed a validation issue with dnn-select Closes #1222 --- .../src/components/dnn-select/dnn-select.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/stencil-library/src/components/dnn-select/dnn-select.tsx b/packages/stencil-library/src/components/dnn-select/dnn-select.tsx index b29556de..d07fedd7 100644 --- a/packages/stencil-library/src/components/dnn-select/dnn-select.tsx +++ b/packages/stencil-library/src/components/dnn-select/dnn-select.tsx @@ -79,8 +79,13 @@ export class DnnSelect { } componentDidLoad() { - this.applySlottedItemsToSelect(); - this.setFormValue(); + requestAnimationFrame(() => { + var validity = this.select.validity; + var validityMessage = validity.valid ? "" : this.select.validationMessage; + this.internals.setValidity(this.select.validity, validityMessage); + this.applySlottedItemsToSelect(); + this.setFormValue(); + }); } // eslint-disable-next-line @stencil-community/own-methods-must-be-private