Skip to content

Commit

Permalink
Set initial value to default prop if provided.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonjahr committed Dec 31, 2021
1 parent 275f119 commit 72fe0ba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/components/checkbox-field.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export default
props:
name: String
label: String
default: Boolean

components: {
TooltipBtn
Expand Down
5 changes: 3 additions & 2 deletions src/concerns/is-field.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ export default
# Shows a "?" button inside the input which toggles a tooltip message.
tooltip:
type: String

data: ->
value: ''
# Set initial value to @default prop if provided.
value: @default || ''

# Tooltip state
tooltipActive: false
Expand Down

0 comments on commit 72fe0ba

Please sign in to comment.