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} options={dataTypeOptions}
value={filterByType} value={filterByType}
onChange={(val) => { onChange={(val) => {
if (val && !Array.isArray(val)) { if (!Array.isArray(val)) {
setFilterByType(val); setFilterByType(val);
} }
}} }}
className={{ wrapper: 'w-full' }} className={{ wrapper: 'w-full' }}
isClearable={true}
/> />
{/* Sort By */} {/* Sort By */}
@@ -1049,11 +1050,12 @@ const PurchasesPerSupplierTab = ({ tabId }: PurchasesPerSupplierTabProps) => {
options={sortByOptions} options={sortByOptions}
value={filterSortBy} value={filterSortBy}
onChange={(val) => { onChange={(val) => {
if (val && !Array.isArray(val)) { if (!Array.isArray(val)) {
setFilterSortBy(val); setFilterSortBy(val);
} }
}} }}
className={{ wrapper: 'w-full' }} className={{ wrapper: 'w-full' }}
isClearable={true}
/> />
</div> </div>