0
Fork 0
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:
Rishabh 2021-09-10 09:28:07 +05:30
parent d3ab0a27eb
commit 852afa302f
2 changed files with 5 additions and 5 deletions

View file

@ -113,7 +113,7 @@ export default class GhMembersFilterLabsComponent extends Component {
]);
get totalFilters() {
return this.filters.length;
return this.filters?.length;
}
constructor(...args) {

View file

@ -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}}