Skip to content
This repository was archived by the owner on Feb 18, 2024. It is now read-only.

Commit 299f568

Browse files
committed
Implement disabled state for select
1 parent 4548708 commit 299f568

8 files changed

+69
-12
lines changed

dist/laravel-ui.min.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.

dist/laravel-ui.min.css.map

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

dist/laravel-ui.min.js

Lines changed: 21 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/laravel-ui.min.js.map

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

docs/index.html

Lines changed: 22 additions & 3 deletions
Large diffs are not rendered by default.

docs/laravel-ui.min.css.map

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

docs/laravel-ui.min.js.map

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

src/components/Select.vue

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,21 @@
133133
box-shadow: none;
134134
}
135135
}
136+
137+
&.disabled {
138+
.current {
139+
box-shadow: 0 0 0 1px $color-disabled;
140+
background: $color-extra-light-gray;
141+
cursor: default !important;
142+
.value,
143+
.value.default {
144+
color: $color-disabled !important;
145+
}
146+
.arrow svg {
147+
fill: $color-disabled;
148+
}
149+
}
150+
}
136151
}
137152
</style>
138153

@@ -229,10 +244,14 @@
229244
},
230245
methods: {
231246
toggle() {
232-
this.isActive = !this.isActive;
247+
if (!this.disabled && !this.loading) {
248+
this.isActive = !this.isActive;
249+
}
233250
},
234251
show() {
235-
this.isActive = true;
252+
if (!this.disabled && !this.loading) {
253+
this.isActive = true;
254+
}
236255
},
237256
hide() {
238257
this.isActive = false;

0 commit comments

Comments
 (0)