RealGrid2 API
Interface
FilterCategory

FilterCategory

사용자 지정 자동필터링 생성 시 카데고리 분류 모델

Signature:

export interface FilterCategory 

Remarks

CategoryCallback 에서 반환되어야 하는 모델의 형태이다.

실제 FilterAutomatingOptions 의 category callback 들을 설정할 때 사용된다.

Example

// 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]}
]

Properties

PropertyModifiersTypeDescription
childsFilterCategory[]하위 그룹의 아이템
daynumber일 정보
emptyboolean빈 값의 아이템인지의 여부
monthnumber월 정보
quarternumber분기 정보
textstring필터 선택 상자의 아이템들에 표시되는 텍스트
valueany
valuesany[]값들
yearnumber연도 정보

Properties Desc

childs

하위 그룹의 아이템

day

일 정보

Remarks:

FilterAutomatingOptions.dateCategoryCallback 을 설정할 때 사용된다.

empty

빈 값의 아이템인지의 여부

month

월 정보

Remarks:

FilterAutomatingOptions.dateCategoryCallback 을 설정할 때 사용된다.

0부터 11까지 각각 1, 2, ..., 12월를 의미한다.

quarter

분기 정보

Remarks:

FilterAutomatingOptions.dateCategoryCallback 을 설정할 때 사용된다.

0부터 3까지 각각 1, 2, 3, 4분기를 의미한다.

text

필터 선택 상자의 아이템들에 표시되는 텍스트

value

Remarks:

FilterAutomatingOptions.textCategoryCallback 을 설정할 때 사용된다.

values

값들

Remarks:

FilterAutomatingOptions.textCategoryCallback, 또는 FilterAutomatingOptions.numberCategoryCallback 을 설정할 때 사용된다.

year

연도 정보

Remarks:

FilterAutomatingOptions.dateCategoryCallback 을 설정할 때 사용된다.