refactor(FE): Make dropdown filters clearable in PurchasesPerSupplierTab

This commit is contained in:
rstubryan
2026-02-11 16:17:15 +07:00
parent ed781da372
commit 14d0dc590f
@@ -1035,11 +1035,12 @@ const PurchasesPerSupplierTab = ({ tabId }: PurchasesPerSupplierTabProps) => {
options={dataTypeOptions}
value={filterByType}
onChange={(val) => {
if (val && !Array.isArray(val)) {
if (!Array.isArray(val)) {
setFilterByType(val);
}
}}
className={{ wrapper: 'w-full' }}
isClearable={true}
/>
{/* Sort By */}
@@ -1049,11 +1050,12 @@ const PurchasesPerSupplierTab = ({ tabId }: PurchasesPerSupplierTabProps) => {
options={sortByOptions}
value={filterSortBy}
onChange={(val) => {
if (val && !Array.isArray(val)) {
if (!Array.isArray(val)) {
setFilterSortBy(val);
}
}}
className={{ wrapper: 'w-full' }}
isClearable={true}
/>
</div>