下拉搜索是否只能在内容中搜索?
在此示例中,当我寻找de
时,它显示的是丹麦(我想要的),但也显示了德国(由于data-value="de"
):
<div class="ui fluid search selection dropdown">
<input type="hidden" name="country">
<i class="dropdown icon"></i>
<div class="default text">Select Country</div>
<div class="menu">
...
<div class="item" data-value="dk"><i class="dk flag"></i>Denmark</div>
...
<div class="item" data-value="de"><i class="de flag"></i>Germany</div>
...
</div>
答案 0 :(得分:0)
我找到了相应的配置:
$('.ui.dropdown').dropdown({
match: "text"
});