File tree 3 files changed +26
-16
lines changed
3 files changed +26
-16
lines changed Original file line number Diff line number Diff line change @@ -459,18 +459,23 @@ export class FilterPanel {
459
459
>
460
460
< slot slot = "header" />
461
461
{ this . changes . extraContent ?.( this . changes ) || '' }
462
- < label > { capts . title } </ label >
463
- < div class = "filter-holder" > { this . getFilterItemsList ( ) } </ div >
464
-
465
- < div class = "add-filter" >
466
- < select
467
- id = { FILTER_ID }
468
- class = "select-css"
469
- onChange = { e => this . onAddNewFilter ( e ) }
470
- >
471
- { this . renderSelectOptions ( this . currentFilterType ) }
472
- </ select >
473
- </ div >
462
+
463
+ { this . changes ?. hideDefaultFilters !== true && (
464
+ [
465
+ < label > { capts . title } </ label > ,
466
+ < div class = "filter-holder" > { this . getFilterItemsList ( ) } </ div > ,
467
+ < div class = "add-filter" >
468
+ < select
469
+ id = { FILTER_ID }
470
+ class = "select-css"
471
+ onChange = { e => this . onAddNewFilter ( e ) }
472
+ >
473
+ { this . renderSelectOptions ( this . currentFilterType ) }
474
+ </ select >
475
+ </ div >
476
+ ]
477
+ ) }
478
+
474
479
< slot />
475
480
< div class = "filter-actions" >
476
481
{ this . disableDynamicFiltering && [
Original file line number Diff line number Diff line change @@ -155,6 +155,10 @@ export class FilterPlugin extends BasePlugin {
155
155
) ;
156
156
}
157
157
158
+ beforeshow ( _ : ShowData ) {
159
+ // used as hook for filter panel
160
+ }
161
+
158
162
extraContent ( ) : any {
159
163
return null ;
160
164
}
@@ -254,11 +258,10 @@ export class FilterPlugin extends BasePlugin {
254
258
autoCorrect : true ,
255
259
filterTypes : this . getColumnFilter ( e . detail . filter ) ,
256
260
filterItems : this . multiFilterItems ,
257
- } ;
258
- this . pop . show ( {
259
- ...data ,
260
261
extraContent : this . extraHyperContent ,
261
- } ) ;
262
+ } ;
263
+ this . beforeshow ?.( data ) ;
264
+ this . pop . show ( data ) ;
262
265
}
263
266
264
267
getColumnFilter (
Original file line number Diff line number Diff line change @@ -151,6 +151,8 @@ export type ShowData = {
151
151
autoCorrect ?: boolean ;
152
152
filterTypes ?: Record < string , string [ ] > ;
153
153
filterItems ?: MultiFilterItem ;
154
+ // hide default filters
155
+ hideDefaultFilters ?: boolean ;
154
156
// pass vnodes from plugins
155
157
extraContent ?: ( data : ShowData ) => any ;
156
158
} & FilterItem & Omit < ColumnRegular , 'filter' > ;
You can’t perform that action at this time.
0 commit comments