Vaadin-grid: How to make Sort and Filter in the same column?

Created on 9 Mar 2017  路  3Comments  路  Source: vaadin/vaadin-grid

Most helpful comment

Didn鈥檛 have time to try it, but this should work in theory (wrapping <vaadin-grid-filter> with <vaadin-grid-sorter>):

<vaadin-grid-column>
  <template class="header">
    <vaadin-grid-sorter path="name.first">
      <vaadin-grid-filter aria-label="First Name" path="name.first" value="[[_filterFirstName]]">
        <input placeholder="First Name" value="{{_filterFirstName::input}}" focus-target>
      </vaadin-grid-filter>
    </vaadin-grid-sorter>
  </template>
</vaadin-grid-column>

All 3 comments

Didn鈥檛 have time to try it, but this should work in theory (wrapping <vaadin-grid-filter> with <vaadin-grid-sorter>):

<vaadin-grid-column>
  <template class="header">
    <vaadin-grid-sorter path="name.first">
      <vaadin-grid-filter aria-label="First Name" path="name.first" value="[[_filterFirstName]]">
        <input placeholder="First Name" value="{{_filterFirstName::input}}" focus-target>
      </vaadin-grid-filter>
    </vaadin-grid-sorter>
  </template>
</vaadin-grid-column>

Thank you.

it worked as:
```







Was this page helpful?
0 / 5 - 0 ratings