File tree 5 files changed +24
-5
lines changed
5 files changed +24
-5
lines changed Original file line number Diff line number Diff line change @@ -34,8 +34,9 @@ interface FilterMenuButtonInput
34
34
"form-method" ?: string ;
35
35
disabled ?: boolean ;
36
36
"a11y-text" ?: AttrString ;
37
- "search-header-placeholder-text" ?: string ;
38
- "a11y-search-header-clear-text" ?: string ;
37
+ "search-header-value" ?: string ;
38
+ "search-header-placeholder-text" ?: AttrString ;
39
+ "a11y-search-header-clear-text" ?: AttrString ;
39
40
"on-expand" ?: ( ) => void ;
40
41
"on-change" ?: ( event : FilterMenuButtonEvent ) => void ;
41
42
"on-collapse" ?: ( event : FilterMenuButtonEvent ) => void ;
Original file line number Diff line number Diff line change @@ -68,6 +68,11 @@ export default {
68
68
category : "@attribute tags" ,
69
69
} ,
70
70
} ,
71
+ searchHeaderValue : {
72
+ control : { type : "text" } ,
73
+ description :
74
+ "optional value override for the input in the search header" ,
75
+ } ,
71
76
searchHeaderPlaceholderText : {
72
77
control : { type : "text" } ,
73
78
description :
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ $ const {
13
13
formAction ,
14
14
formMethod ,
15
15
items ,
16
+ searchHeaderValue ,
16
17
searchHeaderPlaceholderText ,
17
18
a11ySearchHeaderClearText ,
18
19
type: inputType ,
@@ -48,6 +49,7 @@ $ const {
48
49
formMethod = formMethod
49
50
footerText = footerText
50
51
a11yFooterText = a11yFooterText
52
+ searchHeaderValue = searchHeaderValue
51
53
searchHeaderPlaceholderText = searchHeaderPlaceholderText
52
54
a11ySearchHeaderClearText = a11ySearchHeaderClearText
53
55
on-keydown (" handleMenuKeydown" )
Original file line number Diff line number Diff line change @@ -34,8 +34,9 @@ interface FilterMenuInput
34
34
"a11y-footer-text" ?: AttrString ;
35
35
}
36
36
> ;
37
- "search-header-placeholder-text" ?: string ;
38
- "a11y-search-header-clear-text" ?: string ;
37
+ "search-header-value" ?: string ;
38
+ "search-header-placeholder-text" ?: AttrString ;
39
+ "a11y-search-header-clear-text" ?: AttrString ;
39
40
"render-body" ?: Marko . Body ;
40
41
"on-footer-click" ?: ( event : FilterMenuEvent ) => void ;
41
42
"on-form-submit" ?: ( event : FilterMenuEvent ) => void ;
@@ -121,7 +122,12 @@ export default class extends MenuUtils<Input, State> {
121
122
onInput ( input : Input ) {
122
123
this . state = {
123
124
...super . getInputState ( input ) ,
124
- searchTerm : this . state ? this . state . searchTerm : "" ,
125
+ searchTerm :
126
+ input . searchHeaderValue !== undefined
127
+ ? input . searchHeaderValue
128
+ : this . state
129
+ ? this . state . searchTerm
130
+ : "" ,
125
131
} ;
126
132
}
127
133
Original file line number Diff line number Diff line change @@ -52,6 +52,11 @@ export default {
52
52
control : { type : "text" } ,
53
53
description : "forms `method` attribute" ,
54
54
} ,
55
+ searchHeaderValue : {
56
+ control : { type : "text" } ,
57
+ description :
58
+ "optional value override for the input in the search header" ,
59
+ } ,
55
60
searchHeaderPlaceholderText : {
56
61
control : { type : "text" } ,
57
62
description :
You can’t perform that action at this time.
0 commit comments