Storeing FilteringSelect searchAttr이 데이터 저장소의 "식별자"와 동일한 경우 드롭 다운에 고유 한 값 집합이 표시됩니다.
예를 들어 식별자를 myStore에서 "color"로 변경하면 드롭 다운에 중복 된 노란색이 아닌 빨간색, 주황색 및 노란색 만 표시됩니다.
FilteringSelect에서이 상점 정의를 사용하고 searchAttr을 "Fruit"으로 설정하면 두 값만 표시됩니다. 오렌지와 사과
var myStore = new dojo.data.ItemFileReadStore({
url: 'data.json'
});
<div dojoType="dijit.form.ComboBox" store="myStore" id="fsKeywords" searchAttr="name" onChange="filterGrid()"></div>
data.json 파일 :
{
identifier: "Fruit",
label: "Name",
items: [
{
"Fruit":"orange",
"color":"red",
"size":"small"
},
{
"Fruit":"orange",
"color":"orange",
"size":"big"
},
{
"Fruit":"orange",
"color":"yellow",
"size":"small"
},
{
"Fruit":"apple",
"color":"yellow",
"size":"small"
}
]}
내가 프로그래밍 방식
을 가게 식별자를 변경할 수있는 방법이 있는지 궁금합니다