{/* Do not edit this file. It is automatically generated by API Documenter. */}


## FilterCategory

Category classification model when creating custom automatic filtering

**Signature:**

```typescript
export interface FilterCategory
```

## Remarks

[Category Callback](/refs/realgrid#categorycallback ) This is the type of model that must be returned from .

It is used when actually setting category callbacks of [FilterAutomatingOptions](/refs/Interface/FilterAutomatingOptions).

## Example


```js
// In case of Date
[
     {
         text: "2019",
         children: [
             {
                 text: "2nd quarter",
                 children: [
                     {
                         text: "June",
                         children: [
                             {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: "3rd quarter",
                 children: [
                     {
                         text: "July",
                         children: [
                             {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: "August",
                         ...
                     }
                 ],
                 year: 2019,
                 quarter: 2
             },
             {
                 text: "4th quarter",
                 children: [
                     {
                         text: "October",
                         children: [
                             ...
                         ],
                         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}
]

// In case of 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"}
]

// In case of 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]}
]
```

## Events

| Property | Type | Description |
| --- | --- | --- |
| [callback](/refs/Interface/FilterCategory#callback) | [FilterCallback](/refs/realgrid#filtercallback) | Callback to determine filter |

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [childrens](/refs/Interface/FilterCategory#childrens) | [FilterCategory](/refs/Interface/FilterCategory){/* */}\[\] | Items in subgroups |
| [criteria](/refs/Interface/FilterCategory#criteria) | string | expression |
| [day](/refs/Interface/FilterCategory#day) | number | job information |
| [empty](/refs/Interface/FilterCategory#empty) | boolean | Whether or not the item has an empty value |
| [month](/refs/Interface/FilterCategory#month) | number | Month information |
| [quarter](/refs/Interface/FilterCategory#quarter) | number | Branch Information |
| [tag](/refs/Interface/FilterCategory#tag) | any | Tags |
| [text](/refs/Interface/FilterCategory#text) | string | Text displayed on items in the filter selection box |
| [value](/refs/Interface/FilterCategory#value) | any | value |
| [values](/refs/Interface/FilterCategory#values) | any\[\] | values |
| [year](/refs/Interface/FilterCategory#year) | number | Year information |

## Event Desc

### callback

Callback to determine filter

`Type` - [FilterCallback](/refs/realgrid#filtercallback)

**Remarks:**

`true`{/* */}: When subject to filtering, `false`{/* */}: When subject to exclusion from filtering

<hr/>

## Properties Desc

### children

Items in subgroups

`Type` - [FilterCategory](/refs/Interface/FilterCategory){/* */}\[\]

<hr/>

### criteria

expression

`Type` - string

**Remarks:**

If omitted, a grid is created using the entered information.

<hr/>

### day

work information

`Type` - number

**Remarks:**

Used when setting [FilterAutomatingOptions.dateCategoryCallback](/refs/Interface/FilterAutomatingOptions#datecategorycallback).

<hr/>

### empty

Whether the item is empty or not

`Type` - boolean

<hr/>

### month

month information

`Type` - number

**Remarks:**

Used when setting [FilterAutomatingOptions.dateCategoryCallback](/refs/Interface/FilterAutomatingOptions#datecategorycallback).

`0`{/* */} to `11`{/* */} means January, February, ..., and December, respectively.

<hr/>

### quarter

branch information

`Type` - number

**Remarks:**

Used when setting [FilterAutomatingOptions.dateCategoryCallback](/refs/Interface/FilterAutomatingOptions#datecategorycallback).

`0`{/* */} to `3`{/* */} represent the 1st, 2nd, 3rd, and 4th quarters, respectively.

<hr/>

### tag

tag

`Type` - any

<hr/>

### text

Text displayed on items in the filter selection box

`Type` - string

<hr/>

### value

value

`Type` - any

**Remarks:**

Used when setting [FilterAutomatingOptions.textCategoryCallback](/refs/Interface/FilterAutomatingOptions#textcategorycallback).

<hr/>

### values

values

`Type` - any\[\]

**Remarks:**

Used when setting [FilterAutomatingOptions.textCategoryCallback](/refs/Interface/FilterAutomatingOptions#textcategorycallback){/* */}, or [FilterAutomatingOptions.numberCategoryCallback](/refs/Interface/FilterAutomatingOptions#numbercategorycallback).

<hr/>

### year

Year information

`Type` - number

**Remarks:**

Used when setting [FilterAutomatingOptions.dateCategoryCallback](/refs/Interface/FilterAutomatingOptions#datecategorycallback).

<hr/>