vue-select
vue-select copied to clipboard
Add Input "name" prop for using in forms
It will be very nice to have the ability to set HTML <input name=""
attribute for easy form serializing:
<script setup>
const form = ref(null);
</scipt>
<form ref="form" method="POST" action="/add-user.php">
<VueSelect :name="user_name_qx4fhrkkd" ...>
<button
type="submit"
@submit="fetch(
'/add-user.php',
{
method: 'post',
body: new FormData(form),
},
)"></button>
Currently, we are using:
<VueSelect :value="val"></VueSelect>
<input type="hidden" name="user_name_qx4fhrkkd" value="val" />