Skip to content

Commit 252180b

Browse files
set a watch so when an option is selected first and last get populated
1 parent fb0eba5 commit 252180b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/App.vue

+4
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ const filteredNames = computed(() =>
1212
)
1313
)
1414
15+
watch(selected, (name) => {
16+
[last.value, first.value] = name.split(', ')
17+
})
18+
1519
function create() {
1620
if (hasValidInput()) {
1721

0 commit comments

Comments
 (0)