【发布时间】:2021-04-08 15:30:35
【问题描述】:
我正在为 React 使用 MaterialUI 的 DataGrid,并且我为其中一列创建了一个自定义过滤器操作符。
我能够将它添加到documentation 中提到的列中,并且工作正常,但是,这删除了其他默认运算符(包含、相等等...)。
我就是这样做的:
columns: GridColDef[] = [
{
field: 'myFieldName',
headerName: 'Column name',
filterOperators: [MyCustomOperator],// this is the custom operator I have created
}
]
如何附加我的自定义运算符并保留其他运算符?
【问题讨论】:
-
你找到解决办法了吗?
-
@DeepakBiswal,我必须自己添加所有运算符,并实现每个运算符背后的逻辑。