Skip to content

Eloquent results to options array for Select #10

Answered by fenilli
helloadmin asked this question in Q&A
Discussion options

You must be logged in to vote

In FormKit there is the placeholder, where a value can be represented as "default" for an empty option.

<FormKit type="select" placeholder="No user selected" :options="props.users.map((user) => ({ label: user.name, value: user.id }))" />

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@fenilli
Comment options

@helloadmin
Comment options

@helloadmin
Comment options

@fenilli
Comment options

Answer selected by helloadmin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants