Finds names by RegExp with i
param for case insensitive
This commit is contained in:
parent
22bcbfbbc8
commit
48fcbfa5ea
@ -192,6 +192,11 @@ describe("The groupchat moderator tool", function () {
|
||||
filter.value = 'gower';
|
||||
u.triggerEvent(filter, "keyup", "KeyboardEvent");
|
||||
await u.waitUntil(() => ( modal.el.querySelectorAll('.list-group--users > li').length === 1));
|
||||
|
||||
filter.value = 'RoMeO';
|
||||
u.triggerEvent(filter, "keyup", "KeyboardEvent");
|
||||
await u.waitUntil(() => ( modal.el.querySelectorAll('.list-group--users > li').length === 1));
|
||||
|
||||
done();
|
||||
}));
|
||||
|
||||
|
@ -214,7 +214,7 @@ export default (o) => {
|
||||
|
||||
${ (o.users_with_affiliation instanceof Error) ?
|
||||
html`<li class="list-group-item">${o.users_with_affiliation.message}</li>` :
|
||||
(o.users_with_affiliation || []).map(item => ((item.nick || item.jid).match(o.affiliations_filter) ? affiliation_list_item(Object.assign({item}, o)) : '')) }
|
||||
(o.users_with_affiliation || []).map(item => ((item.nick || item.jid).match(new RegExp(o.affiliations_filter, 'i')) ? affiliation_list_item(Object.assign({item}, o)) : '')) }
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user