File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change 2
2
css ,
3
3
customElement ,
4
4
html ,
5
- internalProperty ,
5
+ state ,
6
6
property ,
7
7
query ,
8
8
TemplateResult ,
@@ -15,28 +15,32 @@ import { List } from '@material/mwc-list';
15
15
import { ListBase } from '@material/mwc-list/mwc-list-base' ;
16
16
import { TextField } from '@material/mwc-textfield' ;
17
17
18
+ /**
19
+ * A mwc-list with mwc-textfield that filters the list items for given or separated terms
20
+ */
18
21
@customElement ( 'filtered-list' )
19
22
export class FilteredList extends ListBase {
23
+ /** search mwc-textfield label property */
20
24
@property ( { type : String } )
21
25
searchFieldLabel ?: string ;
22
-
26
+ /** Whether the check all option (checkbox next to search text field) is activated */
23
27
@property ( { type : Boolean } )
24
28
disableCheckAll = false ;
25
29
26
- @internalProperty ( )
30
+ @state ( )
27
31
private get existCheckListItem ( ) : boolean {
28
32
return this . items . some ( item => item instanceof CheckListItem ) ;
29
33
}
30
34
31
- @internalProperty ( )
35
+ @state ( )
32
36
private get isAllSelected ( ) : boolean {
33
37
return this . items
34
38
. filter ( item => ! item . disabled )
35
39
. filter ( item => item instanceof CheckListItem )
36
40
. every ( checkItem => checkItem . selected ) ;
37
41
}
38
42
39
- @internalProperty ( )
43
+ @state ( )
40
44
private get isSomeSelected ( ) : boolean {
41
45
return this . items
42
46
. filter ( item => ! item . disabled )
@@ -124,7 +128,11 @@ export class FilteredList extends ListBase {
124
128
}
125
129
126
130
abbr {
131
+ display : flex;
132
+ flex : auto;
127
133
margin : 8px ;
134
+ text-decoration : none;
135
+ border-bottom : none;
128
136
}
129
137
130
138
mwc-textfield {
You can’t perform that action at this time.
0 commit comments