feature: add clear all filters feature
This commit is contained in:
4 files changed
+29
-2
No files matched your search
@@ -35,3 +35,4 @@ close: Close
|
||||
toggle-secret: Toggle secret visibility
|
||||
minimize: Minimize
|
||||
fullscreen: Fullscreen
|
||||
clear-all-filters: Clear all filters
|
||||
@@ -6,8 +6,11 @@ $xxxxs: sizing.rems(xxxxs); // 1
|
||||
|
||||
.rose-toolbar {
|
||||
background-color: var(--ui-gray-subtler-6);
|
||||
padding: $xxs + $xxxxs;
|
||||
|
||||
.rose-form {
|
||||
padding: $xxs + $xxxxs;
|
||||
button {
|
||||
display: inline-block;
|
||||
font-weight: normal;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
@@ -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}}
|
||||
|
||||
Reference in new issue
Block a user