Skip to content

Commit 4a8b7d3

Browse files
Merge pull request #17 from CodeWithDennis/bugfix/css-and-js-fixes
CSS fixes, return empty array when multiple is empty
2 parents 280562d + 57ee0e9 commit 4a8b7d3

File tree

4 files changed

+34
-9
lines changed

4 files changed

+34
-9
lines changed

resources/css/custom.css

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -179,18 +179,43 @@ html.dark .treeselect-list__item-checkbox-container {
179179
}
180180

181181
.treeselect-input__tags-element:hover {
182-
background-color: rgba(0, 0, 0, 0.1);
182+
background-color: rgba(var(--primary-50), var(--tw-bg-opacity));
183183
}
184184

185-
.treeselect-input__tags-element:hover {
186-
background-color: rgba(var(--primary-600), var(--tw-text-opacity));
187-
color: white;
185+
.treeselect-input__tags-element:hover .treeselect-input__tags-cross svg {
186+
stroke: rgba(var(--gray-950),var(--tw-text-opacity));
188187
}
189188

190-
.treeselect-input__tags-element:hover .treeselect-input__tags-cross svg {
189+
html.dark .treeselect-input__tags-element:hover .treeselect-input__tags-cross svg {
190+
stroke: rgb(255 255 255/var(--tw-text-opacity));
191+
}
192+
193+
.treeselect-input__tags-element {
194+
color: rgba(var(--primary-600), var(--tw-text-opacity));
195+
}
196+
197+
html.dark .treeselect-input__tags-element {
198+
color: rgba(var(--primary-400), var(--tw-text-opacity));
199+
}
200+
201+
html.dark .treeselect-input__tags-cross svg {
202+
stroke-width: 3px;
203+
}
204+
205+
html.dark .treeselect-input__tags-cross svg {
191206
stroke: rgb(255 255 255/var(--tw-text-opacity));
207+
opacity: 0.5;
208+
}
209+
210+
html.dark .treeselect-input__tags-element:hover svg {
211+
opacity: 0.6;
212+
}
213+
214+
.treeselect-input__clear svg {
215+
stroke: rgb(255 255 255/var(--tw-text-opacity));
216+
opacity: 0.5;
192217
}
193218

194219
.treeselect-input__tags {
195220
margin-left: 3px;
196-
}
221+
}

resources/dist/custom.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resources/dist/tree.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resources/js/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default function tree({
2424
init() {
2525
const values = isSingleSelect
2626
? (this.state !== null ? this.state : '')
27-
: (this.state !== null ? this.state.split(',') : '');
27+
: (this.state !== null ? this.state.split(',') : []);
2828

2929
this.tree = new Treeselect({
3030
id: `tree-${name}-id`,

0 commit comments

Comments
 (0)