I am using vaadin-grid component for a view where I am showing some grid data including text. In the columns of text, sorting doesn't seem to be case insensitive. Sorting happens only with the text starting with Capital letters and the ones starting with small letters are being ignored.
I checked the API documentation of vaadin-grid-sorter which is a helper element for sort in vaadin-grid but could not get the desired result.
Please suggest some other way round. Help will be appreciated.
You can always sort your dataset manually, before setting it as the grid's items
.
For how to implement case-insensitive sorting take a look at: How to perform case insensitive sorting in Javascript?
EDIT:
If you're using a (remote API) dataProvider (see https://vaadin.com/elements/vaadin-grid/html-api/elements/Vaadin.GridElement: Lazy Loading with Function Data Provider), your provider function will be called with a callback
function as its second parameter, after the request completes. Just sort your results before passing them to that callback.