지정된 컬렉션을 새로운 옵션으로 업데이트합니다.
collection | string | 업데이트할 컬렉션의 이름 |
options | array | 컬렉션의 새로운 값들 |
boolean | true, 업데이트가 성공했으면; false, 컬렉션을 찾지 못했으면 |
scheduler.config.lightbox.sections=[
{name:"description", height:130, map_to:"text", type:"textarea" , focus:true},
{name:"items", height:23, type:"select",
options:scheduler.serverList("goods", goods_array), map_to:"section_id" },
{name:"time", height:72, type:"time", map_to:"auto"}
];
다음과 같이 구성된 lightbox를 고려해보세요:
scheduler.config.lightbox.sections = [
{ name: "description", ...},
{ name: "sections", type: "select", options: scheduler.serverList("sections"), map_to: "section_id" },
{ name: "time", ... }
];
이 설정에서는 'sections'라는 이름의 리스트를 수정하여 select 컨트롤의 옵션을 업데이트할 수 있습니다.
'sections' 리스트를 업데이트하려면 다음과 같이 하십시오:
scheduler.updateCollection("sections", [
{ key: 5, label: "Section E" },
{ key: 6, label: "Section F" },
{ key: 7, label: "Section G" }
]);
다음과 같이 Units 뷰가 구성되어 있다고 가정해봅시다:
scheduler.createUnitsView({
name: "unit",
property: "section_id",
list: scheduler.serverList("sections") });
표시되는 유닛 리스트를 변경하려면 다음을 사용하세요:
scheduler.updateCollection("sections", [
{ key: 5, label: "Section E" },
{ key: 6, label: "Section F" },
{ key: 7, label: "Section G" }
]);