FilterCategory
사용자 지정 자동필터링 생성 시 카데고리 분류 모델
상세 설명
CategoryCallback 에서 반환되어야 하는 모델의 형태이다.
실제 FilterAutomatingOptions 의 category callback 들을 설정할 때 사용된다.
예제 코드
// Date 일 경우
[
{
text: "2019년도",
childs: [
{
text: "2사분기",
childs: [
{
text: "6월",
childs: [
{text: "2019-06-11", year: 2019, month: 5, day: 11},
{text: "2019-06-12", year: 2019, month: 5, day: 12},
{text: "2019-06-18", year: 2019, month: 5, day: 18},
{text: "2019-06-27", year: 2019, month: 5, day: 27},
{text: "2019-06-30", year: 2019, month: 5, day: 30}
],
year: 2019,
quarter: 1,
month: 5
}
],
year: 2019,
quarter: 1
},
{
text: "3사분기",
childs: [
{
text: "7월",
childs: [
{text: "2019-07-03", year: 2019, month: 6, day: 3},
{text: "2019-07-07", year: 2019, month: 6, day: 7},
{text: "2019-07-17", year: 2019, month: 6, day: 17},
{text: "2019-07-21", year: 2019, month: 6, day: 21}
],
year: 2019,
quarter: 1,
month: 6
},
{
text: "8월",
...
}
],
year: 2019,
quarter: 2
},
{
text: "4사분기",
childs: [
{
text: "10월",
childs: [
...
],
year: 2019,
quarter: 3,
month: 9
}
],
year: 2019,
quarter: 3
},
],
year: 2019,
},
{
text: '2020년도',
...
}
]
[
{text: "2019-06-11", year: 2019, month: 5, day: 11}
{text: "2019-06-12", year: 2019, month: 5, day: 12}
{text: "2019-06-18", year: 2019, month: 5, day: 18},
...
{text: "2021-12-27", year: 2021, month: 12, day: 27}
]
// Text 일 경우
[
{text: "A ~ C", values: [
"Adrian", "Adrienne", "Aladdin", "Alden", "Alea", "Alexa", "Amber",
"Amy", "Arsenio", "Beatrice", "Benedict", "Benjamin", "Blaze", "Brennan",
]},
{text: "D ~ F", values: [...]},
{text: "G ~ I", values: [...]},
{text: "J ~ L", values: [...]}
]
[
{text: "Adrian", value: "Adrian"},
{text: "Adrienne", value: "Adrienne"},
{text: "Aladdin", value: "Aladdin"},
{text: "Alden", value: "Alden"},
{text: "Alea", value: "Alea"}
]
// Number 일 경우
[
{text: "0 ~ 25", values: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24]},
{text: "25 ~ 50", values: [...]},
{text: "50 ~ 75", values: [...]},
{text: "75 ~ 100", values: [...]}
]
[
{text: "0 ~ 1", values: [0]},
{text: "1 ~ 2", values: [1]},
{text: "2 ~ 3", values: [2]},
{text: "3 ~ 4", values: [3]},
{text: "4 ~ 5", values: [4]},
{text: "5 ~ 6", values: [5]},
{text: "6 ~ 7", values: [6]},
...
{text: "99 ~ 100", values: [99]}
]
프로퍼티 정보
month: number
월 정보
quarter: number
분기 정보
values: any[]
값들
상세 설명
FilterAutomatingOptions.textCategoryCallback, 또는 FilterAutomatingOptions.numberCategoryCallback 을 설정할 때 사용된다.