mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
refactor(FE): Make dropdown filters clearable in PurchasesPerSupplierTab
This commit is contained in:
@@ -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>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user