Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/[locale]/(user)/components/Content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const Content = () => {

const handleSearch = (value: string) => {
if (value) {
router.push(`/datasets?query=${encodeURIComponent(value)}`);
router.push(`/search?query=${encodeURIComponent(value)}`);
}
};
const Metrics = [
Expand Down
14 changes: 9 additions & 5 deletions app/[locale]/(user)/datasets/components/FIlter/Filter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ const Filter: React.FC<FilterProps> = ({
value={category}
className=" border-surfaceDefault"
>
<AccordionTrigger className="flex w-full flex-wrap items-center gap-2 rounded-1 bg-[#1F5F8D1A] py-[10px] px-3 hover:no-underline">
<AccordionTrigger className="flex w-full flex-wrap items-center gap-2 rounded-1 bg-[#1F5F8D1A] px-3 py-[10px] hover:no-underline">
<Text fontWeight="medium">{toTitleCase(category)}</Text>
</AccordionTrigger>
<AccordionContent
Expand All @@ -103,18 +103,22 @@ const Filter: React.FC<FilterProps> = ({
name={category}
options={data.map((option) => ({
...option,
disabled: lockedFilters[category]?.includes(option.value) || false,
disabled:
lockedFilters[category]?.includes(option.value) ||
false,
}))}
title={undefined}
value={selectedOptions[category] || []}
onChange={(values) => {
// Prevent unselecting locked filters
const locked = lockedFilters[category] || [];
const newValues = values as string[];

// Ensure all locked values remain selected
const finalValues = Array.from(new Set([...locked, ...newValues]));

const finalValues = Array.from(
new Set([...locked, ...newValues])
);

setSelectedOptions(category, finalValues);
}}
/>
Expand Down
6 changes: 5 additions & 1 deletion app/[locale]/(user)/datasets/dataset.module.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.Search {
input {
width: 80%;
height: 36px;
height: 46px;
}
/* In your global CSS/SCSS file */
div[class*='Input-module_Backdrop'] {
Expand All @@ -18,3 +18,7 @@
max-width: 120px;
}
}

// .Select {
// height: 100%;
// }
Loading