|
@@ -604,23 +604,33 @@ public class DynamicGridTreeUIComponent<T, TKey> : IDynamicGridUIComponent<T>, I
|
|
|
{
|
|
|
var colIndex = _tree.Columns.IndexOf(column);
|
|
|
var col = ColumnList[colIndex];
|
|
|
+ var filter = Parent.GetColumnFilter(col);
|
|
|
+
|
|
|
if (col is DynamicGridColumn gridColumn)
|
|
|
{
|
|
|
var rowPredicate = DynamicGridGridUIComponentExtension.ConvertColumnPredicates(gridColumn, column.FilterPredicates);
|
|
|
+ if(filter is not null)
|
|
|
+ {
|
|
|
+ var oldPred = rowPredicate;
|
|
|
+ if(oldPred is not null)
|
|
|
+ {
|
|
|
+ rowPredicate = row => oldPred(row) && filter.FilterRow(row);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ rowPredicate = filter.FilterRow;
|
|
|
+ }
|
|
|
+ }
|
|
|
if(rowPredicate is not null)
|
|
|
{
|
|
|
list.Add(new(gridColumn.ColumnName, rowPredicate));
|
|
|
}
|
|
|
}
|
|
|
- else if(col is DynamicActionColumn dac && dac.FilterRecord is not null)
|
|
|
+ else if(col is DynamicActionColumn dac)
|
|
|
{
|
|
|
- if(dac.SelectedFilters is not null && dac.SelectedFilters.Length > 0)
|
|
|
- {
|
|
|
- list.Add(new(column.MappingName, (row) => dac.FilterRecord(row, dac.SelectedFilters)));
|
|
|
- }
|
|
|
- if(dac.ExcludeFilters is not null && dac.ExcludeFilters.Length > 0)
|
|
|
+ if(filter is not null)
|
|
|
{
|
|
|
- list.Add(new(column.MappingName, (row) => !dac.FilterRecord(row, dac.ExcludeFilters)));
|
|
|
+ list.Add(new(column.MappingName, filter.FilterRow));
|
|
|
}
|
|
|
}
|
|
|
}
|