feature: add clear all filters feature

This commit is contained in:
Randall Morey committed 2021-11-12 16:11:45 -05:00
1 parent f44c3d783f
commit f7dd4e6b99
4 files changed
+29 -2

No files matched your search

@@ -197,8 +197,21 @@ export default class ScopesScopeAuthMethodsRoute extends Route {
array.addObject(value);
}
/**
* Sets the specified resource filter field to the specified value.
* @param {string} field
* @param value
*/
@action
filterBy(field, value) {
this[field] = value;
}
/**
* Clears and filter selections.
*/
@action
clearAllFilters() {
this.type = [];
}
}
@@ -72,6 +72,16 @@
</form.checkboxGroup>
</Rose::Dropdown>
{{/with}}
{{#if
(has-resource-filter-param-selections 'scopes.scope.auth-methods')
}}
<Rose::Button
@style='inline-link-action'
@iconLeft='flight-icons/svg/x-16'
{{on 'click' (route-action 'clearAllFilters')}}
>{{t 'actions.clear-all-filters'}}</Rose::Button>
{{/if}}
</Rose::Form>
</Rose::Toolbar>
{{/if}}