diff --git a/client/.eslintrc.cjs b/client/.eslintrc.cjs index 8f39e003b..155b018fd 100644 --- a/client/.eslintrc.cjs +++ b/client/.eslintrc.cjs @@ -7,7 +7,7 @@ module.exports = { ], plugins: ['prettier'], rules: { - '@typescript-eslint/no-unused-vars': ['warn'], + '@typescript-eslint/no-unused-vars': ['warn', { ignoreRestSiblings: true }], 'import/order': [ 'warn', { diff --git a/client/package.json b/client/package.json index 4c0482036..f98244838 100644 --- a/client/package.json +++ b/client/package.json @@ -76,6 +76,7 @@ "maplibre-gl": "3.6.2", "next": "14.2.2", "next-auth": "4.24.7", + "nuqs": "1.17.2", "postcss": "8.4.31", "query-string": "8.1.0", "rc-tree": "5.7.0", diff --git a/client/src/components/tree-select/component.tsx b/client/src/components/tree-select/component.tsx index 1aea66c27..98ba01415 100644 --- a/client/src/components/tree-select/component.tsx +++ b/client/src/components/tree-select/component.tsx @@ -429,7 +429,12 @@ const InnerTreeSelect = ( {theme === 'inline-primary' && index < currentOptions.length - 1 && ','} ))} - {currentOptions?.length > badgesToShow && ( + {!badgesToShow && currentOptions?.length > 0 && ( + + {currentOptions.length - badgesToShow} selected + + )} + {currentOptions?.length > badgesToShow && Boolean(badgesToShow) && ( {currentOptions.length - badgesToShow} more selected diff --git a/client/src/components/ui/select.tsx b/client/src/components/ui/select.tsx index 989cba607..887be33e7 100644 --- a/client/src/components/ui/select.tsx +++ b/client/src/components/ui/select.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import * as SelectPrimitive from '@radix-ui/react-select'; -import { Check, ChevronDown, ChevronUp } from 'lucide-react'; +import { ChevronDownIcon, ChevronUpIcon } from '@heroicons/react/solid'; import { cn } from '@/lib/utils'; @@ -17,14 +17,23 @@ const SelectTrigger = React.forwardRef< span]:line-clamp-1', + 'group flex h-10 w-full items-center justify-between rounded-md border border-gray-200 bg-background px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:border-navy-400 focus:outline-none focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1', className, )} {...props} > {children} - + <> + )); @@ -39,7 +48,7 @@ const SelectScrollUpButton = React.forwardRef< className={cn('flex cursor-default items-center justify-center py-1', className)} {...props} > - +