how to vaadin 8 Grid Sort icon showing when it`s initialized?

hi guys.
im a beginner of vaadin.
my team still using vaadin 8.

one day our guest request us one thing about the grid.

they want to show the sorting icon in each column head
like this image.( its get form google which searched by the key word “vaadin grid sort”)

how can i do that?

The screenshot you have found is not the Grid of Vaadin 8, it is the newer Grid component we have in Vaadin 10+. It is visually behavig slightly differently. You need to click the header of the sortable column in Grid in order to icon to appear.

If you wan to have visual cue that Grid column is sortable, you could try it via theming, e.g. put something like this to your theme .scss file

.v-grid-cell.sortable::after {
    font-family: ThemeIcons, sans-serif;
    content: "\f0de" "\f0dd" attr(sort-order);
    position: absolute;
    color: grey;
    right: 18px;
    font-size: 12px;