Hi
I can’t figure out a working smart-select with a f7-list-input(type=“select”). so I wonder if there is an example for this?
Thanks for reply.
Actually I wanted to have smart-select in a form linked to a variable, so I’ve managed doing that with:
/* using vue template with lang="pug" */
f7-block
.list
ul
li
a.item-link.smart-select(
id="areaSelect"
href="#" data-searchbar="true"
data-close-on-select="true"
)
select(name="area" :value="areaCode" @change="areaCode=$event.target.value" )
option(v-for="area in studyAreas"
:value="area.code") {{area.name + '(' + area.code + ')'}}
.item-content
.item-inner
.item-title Area
.item-after
But the only thing remained is to put selected value in .item-title
and not in .item-after
.
Update:
As in documents "valueEl
: Visual element where to insert selected value. If not passed then it will look for <div class="item-after">
element" .