Serenity: Unable to create quick search on memory-grid

Created on 7 Aug 2019  路  2Comments  路  Source: serenity-is/Serenity

Hello everyone!
am trying to create quick search option on the editor and because of this code I get the search box

protected createToolbarExtensions(): void { super.createToolbarExtensions(); Serenity.GridUtils.addQuickSearchInputCustom(this.toolbar.element, (field, text) => { this.searchText = Select2.util.stripDiacritics(Q.trimToNull(text) || '').toLowerCase(); var itemcode = Premier.TblItemRow.getLookup().items.filter(x => x.Material_Number === this.searchText); this.view.setItems(this.view.getItems(), true); }); }

Capture13

But It cant search items for searched string
I know the above code is not enough but as I new to typescript and serenity framework am unable to find any solution for this
Please help!
Thanks in advance

Most helpful comment

Client side filtering is not (yet) directly supported by serenity (it's on the roadmap though).

In one of my projects, I implemented client side filtering like this:

this.view.setFilter((item, view) => { return <insert your filter criteria here>; }); this.view.refresh();

All 2 comments

Client side filtering is not (yet) directly supported by serenity (it's on the roadmap though).

In one of my projects, I implemented client side filtering like this:

this.view.setFilter((item, view) => { return <insert your filter criteria here>; }); this.view.refresh();

@hannesb thanx for the response but it didn't work for me
So I used some code from PermissionCheckEditor.ts and modify it a bit and now my searchbox works perfectly fine like grid serachbox

If anyone needs help regarding this then let me know and for now am closing this issue

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Amitloh picture Amitloh  路  3Comments

StefanTheiner picture StefanTheiner  路  3Comments

chintankukadiya18 picture chintankukadiya18  路  3Comments

Pinellus picture Pinellus  路  3Comments

GitHubOrim picture GitHubOrim  路  3Comments