Jquery ui 自动完成:如何搜索类别?
Jquery ui autocomplete : How to search category?
我正在尝试使用 Jquery ui 自动完成,我正在观看官方网站代码。
https://jqueryui.com/autocomplete/#categories
搜索'label value'然后显示'label value'和'类别值',
但我想这样切换
"search 'category value' then show 'category value'and select 'label value'."
有人知道如何搜索基于自动完成的类别值吗?
我刚刚尝试切换 'label' 和 'category'
像这样
{ label: "Products", category: "annhhx10" },
{ label: "Products", category: "annk K12" },
这对我来说是一个接近的解决方案,但是'label'无法解决像'category'这样的重复值。
也'category'无法点击。
请帮忙谢谢。
谢谢你的帮助。现在我解决了这个问题。
我刚刚从这个主题中找到了另一个解决方案。
Jquery UI Autocomplete: search from multiple attributes of one array
这是 "searches for matches from multiple attributes of array" 的解决方案。
所以本主题使用 'desc' 进行搜索 'label'。
我将 'desc' 更改为 'category',它工作正常。
我正在尝试使用 Jquery ui 自动完成,我正在观看官方网站代码。
https://jqueryui.com/autocomplete/#categories
搜索'label value'然后显示'label value'和'类别值',
但我想这样切换
"search 'category value' then show 'category value'and select 'label value'."
有人知道如何搜索基于自动完成的类别值吗?
我刚刚尝试切换 'label' 和 'category'
像这样
{ label: "Products", category: "annhhx10" },
{ label: "Products", category: "annk K12" },
这对我来说是一个接近的解决方案,但是'label'无法解决像'category'这样的重复值。 也'category'无法点击。
请帮忙谢谢。
谢谢你的帮助。现在我解决了这个问题。
我刚刚从这个主题中找到了另一个解决方案。
Jquery UI Autocomplete: search from multiple attributes of one array
这是 "searches for matches from multiple attributes of array" 的解决方案。
所以本主题使用 'desc' 进行搜索 'label'。 我将 'desc' 更改为 'category',它工作正常。