mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Refined filter UI reset for email filters
no refs - resets email filters value on changing filter type correctly
This commit is contained in:
parent
d3ab0a27eb
commit
852afa302f
2 changed files with 5 additions and 5 deletions
|
@ -113,7 +113,7 @@ export default class GhMembersFilterLabsComponent extends Component {
|
|||
]);
|
||||
|
||||
get totalFilters() {
|
||||
return this.filters.length;
|
||||
return this.filters?.length;
|
||||
}
|
||||
|
||||
constructor(...args) {
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
{{else if (eq @filter.type 'email_count')}}
|
||||
<GhTextInput
|
||||
@value={{this.filterValue}}
|
||||
@value={{@filter.value}}
|
||||
@type="number"
|
||||
@focus-out={{fn this.updateInputFilterValue @filter.type @filter.id}}
|
||||
@input={{fn this.setInputFilterValue @filter.type @filter.id}}
|
||||
|
@ -32,7 +32,7 @@
|
|||
|
||||
{{else if (eq @filter.type 'email_opened_count')}}
|
||||
<GhTextInput
|
||||
@value={{this.filterValue}}
|
||||
@value={{@filter.value}}
|
||||
@type="number"
|
||||
@focus-out={{fn this.updateInputFilterValue @filter.type @filter.id}}
|
||||
@keyPress={{fn this.updateInputFilterValueOnEnter @filter.type @filter.id}}
|
||||
|
@ -41,7 +41,7 @@
|
|||
|
||||
{{else if (eq @filter.type 'email_open_rate')}}
|
||||
<GhTextInput
|
||||
@value={{this.filterValue}}
|
||||
@value={{@filter.value}}
|
||||
@type="number"
|
||||
@focus-out={{fn this.updateInputFilterValue @filter.type @filter.id}}
|
||||
@keyPress={{fn this.updateInputFilterValueOnEnter @filter.type @filter.id}}
|
||||
|
@ -88,7 +88,7 @@
|
|||
{{else}}
|
||||
<GhTextInput
|
||||
@name={{@filter.id}}
|
||||
@value={{this.filterValue}}
|
||||
@value={{@filter.value}}
|
||||
@focus-out={{fn this.updateInputFilterValue @filter.type @filter.id}}
|
||||
@keyPress={{fn this.updateInputFilterValueOnEnter @filter.type @filter.id}}
|
||||
@input={{fn this.setInputFilterValue @filter.type @filter.id}}
|
||||
|
|
Loading…
Add table
Reference in a new issue