Add searching ACL's by token
This commit is contained in:
parent
853a40b256
commit
bf30902812
|
@ -28,10 +28,14 @@ export default Controller.extend(WithFiltering, {
|
|||
});
|
||||
}),
|
||||
filter: function(item, { s = '', type = '' }) {
|
||||
const sLower = s.toLowerCase();
|
||||
return (
|
||||
get(item, 'Name')
|
||||
(get(item, 'Name')
|
||||
.toLowerCase()
|
||||
.indexOf(s.toLowerCase()) !== -1 &&
|
||||
.indexOf(sLower) !== -1 ||
|
||||
get(item, 'ID')
|
||||
.toLowerCase()
|
||||
.indexOf(sLower) !== -1) &&
|
||||
(type === '' || get(item, 'Type') === type)
|
||||
);
|
||||
},
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{{!<form>}}
|
||||
{{freetext-filter onchange=(action onchange) value=search placeholder="Search by name"}}
|
||||
{{freetext-filter onchange=(action onchange) value=search placeholder="Search by name/token"}}
|
||||
{{radio-group name="type" value=type items=filters onchange=(action onchange)}}
|
||||
{{!</form>}}
|
||||
|
|
Loading…
Reference in a new issue