@@ -19,15 +19,19 @@ export function getProperties(values: DatagridDropdownFilterPreviewProps, defaul
19
19
hidePropertiesIn ( defaultProperties , values , [ "attr" , "attrChoice" , "filterOptions" , "auto" ] ) ;
20
20
}
21
21
22
- if ( values . filterable ) {
23
- hidePropertyIn ( defaultProperties , values , "clearable" ) ;
22
+ if ( values . filterable || values . multiSelect ) {
23
+ // empty option is not shown when any of those are enabled
24
24
hidePropertyIn ( defaultProperties , values , "emptyOptionCaption" ) ;
25
- } else {
26
- hidePropertyIn ( defaultProperties , values , "filterInputPlaceholderCaption" ) ;
27
25
}
28
26
29
- if ( ! values . filterable ) {
27
+ if ( values . filterable ) {
28
+ // when it is filterable, we always imply clearable as true, so we hide the property
29
+ hidePropertyIn ( defaultProperties , values , "clearable" ) ;
30
+ } else {
31
+ // when it is not filterable, we don't need the attribute to search on
30
32
hidePropertyIn ( defaultProperties , values , "refSearchAttr" ) ;
33
+ // when it is not filterable, we hide the caption for input as input is never shown
34
+ hidePropertyIn ( defaultProperties , values , "filterInputPlaceholderCaption" ) ;
31
35
}
32
36
33
37
if ( values . refCaptionSource === "attr" ) {
0 commit comments