diff --git a/packages/frontend/core/src/components/page-list/filter/multi-select.css.ts b/packages/frontend/core/src/components/page-list/filter/multi-select.css.ts
index 9c595e3971..6eac712031 100644
--- a/packages/frontend/core/src/components/page-list/filter/multi-select.css.ts
+++ b/packages/frontend/core/src/components/page-list/filter/multi-select.css.ts
@@ -22,6 +22,12 @@ export const optionList = style({
flexDirection: 'column',
gap: 4,
padding: '0 4px',
+ maxHeight: '220px',
+});
+export const scrollbar = style({
+ vars: {
+ '--scrollbar-width': '4px',
+ },
});
export const selectOption = style({
display: 'flex',
diff --git a/packages/frontend/core/src/components/page-list/filter/multi-select.tsx b/packages/frontend/core/src/components/page-list/filter/multi-select.tsx
index 41dd71552a..d0eae8daa5 100644
--- a/packages/frontend/core/src/components/page-list/filter/multi-select.tsx
+++ b/packages/frontend/core/src/components/page-list/filter/multi-select.tsx
@@ -1,4 +1,5 @@
-import { Menu, MenuItem } from '@affine/component';
+import { Menu, MenuItem, Scrollable } from '@affine/component';
+import { useAFFiNEI18N } from '@affine/i18n/hooks';
import type { MouseEvent } from 'react';
import { useMemo } from 'react';
@@ -16,40 +17,55 @@ export const MultiSelect = ({
value: string;
}[];
}) => {
+ const t = useAFFiNEI18N();
const optionMap = useMemo(
() => Object.fromEntries(options.map(v => [v.value, v])),
[options]
);
+ const items = useMemo(() => {
+ return (
+
+
+ {options.length === 0 ? (
+
+ ) : (
+ options.map(option => {
+ const selected = value.includes(option.value);
+ const click = (e: MouseEvent) => {
+ e.stopPropagation();
+ e.preventDefault();
+ if (selected) {
+ onChange(value.filter(v => v !== option.value));
+ } else {
+ onChange([...value, option.value]);
+ }
+ };
+ return (
+
+ );
+ })
+ )}
+
+
+
+ );
+ }, [onChange, options, t, value]);
+
return (
-