Skip to content
This repository was archived by the owner on Apr 25, 2020. It is now read-only.

Commit b48ba69

Browse files
petarvubartkozal
authored andcommitted
Update FloatLabel.vue (#23)
Adding "always" prop, so label stays always on when required.
1 parent 35cab2c commit b48ba69

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

components/FloatLabel.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ export default {
1515
type: Boolean,
1616
default: true
1717
},
18+
always: {
19+
type: Boolean,
20+
default: false
21+
},
1822
label: {
1923
type: String,
2024
default: ''
@@ -80,7 +84,7 @@ export default {
8084
},
8185
classObject () {
8286
return {
83-
'vfl-label-on-input': this.on && this.isActive,
87+
'vfl-label-on-input': this.on && (this.isActive || this.always),
8488
'vfl-label-on-focus': this.isFocused
8589
}
8690
},

0 commit comments

Comments
 (0)