added empty range filter condition
This commit is contained in:
@@ -1,4 +1,22 @@
|
|||||||
<script setup lang="ts"></script>
|
<script setup lang="ts">
|
||||||
|
// import
|
||||||
|
|
||||||
|
import { PRODUCT_RANGE } from "~/constants";
|
||||||
|
|
||||||
|
// state
|
||||||
|
|
||||||
|
const params = useUrlSearchParams("history");
|
||||||
|
|
||||||
|
// life-cycle
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
if (!("range" in params)) {
|
||||||
|
params.range = [];
|
||||||
|
params.range[0] = PRODUCT_RANGE.min;
|
||||||
|
params.range[1] = PRODUCT_RANGE.max;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="w-full container flex flex-col">
|
<div class="w-full container flex flex-col">
|
||||||
@@ -19,7 +37,7 @@
|
|||||||
<div class="w-full flex items-center justify-end gap-4">
|
<div class="w-full flex items-center justify-end gap-4">
|
||||||
<Input
|
<Input
|
||||||
placeholder="جست و جو محصول ..."
|
placeholder="جست و جو محصول ..."
|
||||||
class="bg-slate-50 !border-slate-200 hover:border-slate-300 focus:!border-slate-800 w-8/12"
|
class="bg-slate-50 !border-slate-200 hover:border-slate-300 focus:!border-slate-800 !rounded-full w-8/12"
|
||||||
/>
|
/>
|
||||||
<FilterButton />
|
<FilterButton />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user