Force offers view when hub or supplier selected
All checks were successful
Build Docker Image / build (push) Successful in 4m59s
All checks were successful
Build Docker Image / build (push) Successful in 4m59s
This commit is contained in:
@@ -235,11 +235,12 @@ export function useCatalogSearch() {
|
|||||||
|
|
||||||
const selectItem = (type: string, id: string, label: string) => {
|
const selectItem = (type: string, id: string, label: string) => {
|
||||||
setLabel(type, id, label)
|
setLabel(type, id, label)
|
||||||
|
const forcedView = (type === 'hub' || type === 'supplier') ? null : (lastViewMode.value === 'offers' ? null : lastViewMode.value)
|
||||||
updateQuery({
|
updateQuery({
|
||||||
[type]: id,
|
[type]: id,
|
||||||
select: null, // Exit selection mode
|
select: null, // Exit selection mode
|
||||||
info: null, // Exit info mode
|
info: null, // Exit info mode
|
||||||
view: lastViewMode.value === 'offers' ? null : lastViewMode.value
|
view: forcedView
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user