Add showClear to dropdown to reset filter
parent
418a53af41
commit
291d699b9f
|
@ -29,7 +29,7 @@
|
||||||
</Column>
|
</Column>
|
||||||
<Column field="brand" header="Brand" filterMatchMode="equals">
|
<Column field="brand" header="Brand" filterMatchMode="equals">
|
||||||
<template #filter>
|
<template #filter>
|
||||||
<Dropdown v-model="filters['brand']" :options="brands" optionLabel="brand" optionValue="value" placeholder="Select a Brand" class="p-column-filter">
|
<Dropdown v-model="filters['brand']" :options="brands" optionLabel="brand" optionValue="value" placeholder="Select a Brand" class="p-column-filter" :showClear="true">
|
||||||
<template #option="slotProps">
|
<template #option="slotProps">
|
||||||
<div class="p-clearfix p-dropdown-car-option">
|
<div class="p-clearfix p-dropdown-car-option">
|
||||||
<img :alt="slotProps.option.brand" :src="'demo/images/car/' + slotProps.option.brand + '.png'" />
|
<img :alt="slotProps.option.brand" :src="'demo/images/car/' + slotProps.option.brand + '.png'" />
|
||||||
|
@ -74,7 +74,7 @@
|
||||||
</Column>
|
</Column>
|
||||||
<Column field="brand" header="Brand" filterMatchMode="equals">
|
<Column field="brand" header="Brand" filterMatchMode="equals">
|
||||||
<template #filter>
|
<template #filter>
|
||||||
<Dropdown v-model="filters['brand']" :options="brands" optionLabel="brand" optionValue="value" placeholder="Select a Brand" class="p-column-filter">
|
<Dropdown v-model="filters['brand']" :options="brands" optionLabel="brand" optionValue="value" placeholder="Select a Brand" class="p-column-filter" :showClear="true">
|
||||||
<template #option="slotProps">
|
<template #option="slotProps">
|
||||||
<div class="p-clearfix p-dropdown-car-option">
|
<div class="p-clearfix p-dropdown-car-option">
|
||||||
<img :alt="slotProps.option.brand" :src="'demo/images/car/' + slotProps.option.brand + '.png'" />
|
<img :alt="slotProps.option.brand" :src="'demo/images/car/' + slotProps.option.brand + '.png'" />
|
||||||
|
|
Loading…
Reference in New Issue