Skip to content

@primevue datatable filter icon change #46

Answered by atakantepe
subhajit-8 asked this question in PrimeVue
Discussion options

You must be logged in to vote

Hi, yes, you can change the icon using custom icons. You can check these docs
➡️ https://primevue.org/customicons/
➡️ https://primevue.org/datatable/#api.column.slots.filtericon

You can add your own icon like this.

<Column field="name" header="Name" style="min-width: 12rem">
  <template #body="{ data }">
    {{ data.name }}
  </template>
  <template #filter="{ filterModel, filterCallback }">
    <InputText
      v-model="filterModel.value"
      type="text"
      @input="filterCallback()"
      class="p-column-filter"
      placeholder="Search by name"
    />
  </template>
  <template #filtericon>
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
      <g id="chevron-down">…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by atakantepe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants