Radio
라디오 버튼 모음

노트
라이트박스에서 이 컨트롤을 사용하려면 editors 확장을 활성화하세요.
scheduler.plugins({
editors: true /*!*/
});
const priorities = [
{ key: 1, label: 'High' },
{ key: 2, label: 'Medium' },
{ key: 3, label: 'Low' }
];
scheduler.locale.labels.section_priority = 'Priority';
scheduler.config.lightbox.sections = [
{ name:"text", height:50, map_to:"text", type:"textarea", focus:true },
{ name:"priority", height:58, options:priorities,
map_to:"priority", type:"radio", vertical:true},
{ name:"time", height:72, type:"time", map_to:"auto"}
];
초기화
라이트박스에 Radio 컨트롤을 추가하려면 아래 절차를 따르세요:
- 페이지에서 'editors' 확장을 활성화합니다:
scheduler.plugins({
editors: true
});
- 라이트박스 구성에 섹션을 추가합니다:
scheduler.config.lightbox.sections = [
{ name:"description", ... },
{ name:"radiobutton", height:58, options:priorities,
map_to:"priority", type:"radio", vertical:true},
{ name:"time", ...}
];
- 섹션의 레이블을 설정합니다:
scheduler.locale.labels.section_priority = 'Priority';
속성
다음 속성은 주로 중요하고 'radio' 컨트롤에 일반적으로 설정됩니다(전체 목록은 여기를 참조하십시오):
| name | (string) 섹션의 이름 |
| height | (number) 섹션의 높이 |
| map_to | (string) 섹션에 매핑될 데이터 속성의 이름 |
| type | (textarea,time,select,template,multiselect,radio,checkbox,combo) 섹션 컨트롤의 유형 |
| options | (array of objects) 컨트롤의 선택 옵션을 정의합니다 (for 'select', 'multiselect', 'radio', 'combo' 컨트롤). 배열의 각 객체는 하나의 옵션을 지정하며 다음 속성을 가집니다:
|
| vertical | (boolean) 라디오 버튼을 수직으로 배치할지 여부를 지정합니다(true인 경우 수직, for the 'multiselect' and 'radio' controls인 경우 수평) |