Skip to content

Commit

Permalink
fix: part speed fan not allowing a 0 in the input
Browse files Browse the repository at this point in the history
  • Loading branch information
cadriel committed Jan 23, 2021
1 parent 43bea77 commit 1cc404e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/inputs/InputSlider.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
<v-text-field
v-if="!readonly"
:value="newValue"
@change="emitChange"
:suffix="valueSuffix"
:rules="rules"
:class="classes"
:disabled="disabled || loading"
@change="emitChange"
@focus="$event.target.select()"
class="v-input--x-dense v-input--text-right"
single-line
Expand Down
4 changes: 2 additions & 2 deletions src/components/widgets/FanWidget.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ export default class FanWidget extends Mixins(UtilsMixin) {
}
rules = [
(v: number) => {
(v: string) => {
if (this.offBelow <= 0) return true
return (v >= this.offBelow || v === 0) || 'min error'
return (parseFloat(v) >= this.offBelow || parseFloat(v) === 0) || 'min error'
}
]
}
Expand Down

0 comments on commit 1cc404e

Please sign in to comment.