Skip to content

Commit

Permalink
Fix. Display body on update method.
Browse files Browse the repository at this point in the history
  • Loading branch information
afonja14755 committed Apr 9, 2024
1 parent 4ab0719 commit e518d25
Show file tree
Hide file tree
Showing 7 changed files with 122 additions and 118 deletions.
2 changes: 1 addition & 1 deletion dist/css/ux-select.css

Large diffs are not rendered by default.

225 changes: 113 additions & 112 deletions dist/js/ux-select.es.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/ux-select.es.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/ux-select.iife.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/ux-select.iife.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/scss/_styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@
#{$ux}.-image & {
display: flex;
flex-direction: row-reverse;
align-items: center;
justify-content: flex-end;
gap: 0.5rem;
}
Expand Down
6 changes: 4 additions & 2 deletions src/ux-select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,10 @@ export default class UxSelect {
}

if (!this.uxBody) throw new Error('uxBody is undefined');
if (this.uxBody.childNodes[1]) {
this.uxBody.replaceChild(selectList, this.uxBody.childNodes[1]);

const replacementChildIndex = this.config.isSearchable ? 1 : 0;
if (this.uxBody.childNodes[replacementChildIndex]) {
this.uxBody.replaceChild(selectList, this.uxBody.childNodes[replacementChildIndex]);
} else {
this.uxBody.appendChild(selectList);
}
Expand Down

0 comments on commit e518d25

Please sign in to comment.