Skip to content

Commit 4e7dd1d

Browse files
fix(frontend): move error message before tag input
1 parent 84db24f commit 4e7dd1d

File tree

1 file changed

+5
-0
lines changed
  • packages/frontend/components/tag-input

1 file changed

+5
-0
lines changed

packages/frontend/components/tag-input/index.js

+5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import TagInput from "@accessible-components/tag-input";
22

33
export const TagInputFieldComponent = class extends HTMLElement {
44
connectedCallback() {
5+
this.$errorMessage = this.querySelector(".error-message");
56
this.$hint = this.querySelector(".hint");
67
this.$replacedLabel = this.querySelector(".label");
78
this.$replacedInput = this.querySelector(".input");
@@ -30,6 +31,10 @@ export const TagInputFieldComponent = class extends HTMLElement {
3031
this.insertBefore(this.$hint, this.querySelector(".tag-input"));
3132
}
3233

34+
if (this.$errorMessage) {
35+
this.insertBefore(this.$errorMessage, this.querySelector(".tag-input"));
36+
}
37+
3338
this.querySelector(".tag-input-label").classList.add("label");
3439

3540
this.$replacedLabel.remove();

0 commit comments

Comments
 (0)