File tree Expand file tree Collapse file tree 4 files changed +17
-10
lines changed
packages/frappe-ui-react/src/components Expand file tree Collapse file tree 4 files changed +17
-10
lines changed Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ const Breadcrumbs: React.FC<BreadcrumbsProps> = ({ items }) => {
7373 return (
7474 < div className = "flex min-w-0 items-center" >
7575 { dropdownItems . length > 0 && (
76- < div className = "h-7" >
76+ < div className = "h-7 flex items-center " >
7777 < Dropdown options = { dropdownItems as unknown as DropdownOptions } >
7878 < Button variant = "ghost" >
7979 < ThreeDotsIcon />
Original file line number Diff line number Diff line change @@ -176,7 +176,7 @@ const CircularProgressBar: React.FC<CircularProgressBarProps> = ({
176176
177177 return (
178178 < div
179- className = { `progressbar ${ completedClass } ${ variantClass } text-ink-gray-3` }
179+ className = { `progressbar ${ completedClass } ${ variantClass } dark: text-ink-gray-3` }
180180 role = "progressbar"
181181 aria-valuenow = { progress }
182182 aria-valuemin = { 0 }
Original file line number Diff line number Diff line change @@ -7,7 +7,13 @@ const meta: Meta<typeof Combobox> = {
77 title : "Components/Combobox" ,
88 tags : [ "autodocs" ] ,
99 component : Combobox ,
10- parameters : { docs : { source : { type : "dynamic" } } , layout : "centered" } ,
10+ parameters : {
11+ docs : {
12+ source : { type : "dynamic" } ,
13+ story : { height : "300px" } ,
14+ } ,
15+ layout : "centered" ,
16+ } ,
1117 argTypes : {
1218 options : {
1319 control : "object" ,
Original file line number Diff line number Diff line change @@ -51,8 +51,8 @@ export const Combobox: React.FC<ComboboxProps> = ({
5151 } , [ value , allOptionsFlat ] ) ;
5252
5353 const filteredOptions = useMemo ( ( ) => {
54- if ( ! query ) {
55- return options ;
54+ if ( ! query ) {
55+ return options ;
5656 }
5757
5858 return options
@@ -66,10 +66,12 @@ export const Combobox: React.FC<ComboboxProps> = ({
6666 )
6767 . filter ( ( opt ) =>
6868 typeof opt === "string"
69- ? opt
69+ ? opt . toLowerCase ( ) . includes ( query . toLowerCase ( ) )
7070 : "group" in opt
71- ? opt . options . length
72- : opt
71+ ? opt . options . some ( ( o ) =>
72+ getLabel ( o ) . toLowerCase ( ) . includes ( query . toLowerCase ( ) )
73+ )
74+ : opt . label . toLowerCase ( ) . includes ( query . toLowerCase ( ) )
7375 ) ;
7476 } , [ options , query ] ) ;
7577
@@ -138,8 +140,7 @@ export const Combobox: React.FC<ComboboxProps> = ({
138140 </ ComboboxButton >
139141 < ComboboxOptions
140142 className = { `
141- absolute z-[100] mt-1 w-full bg-surface-white border border-surface-gray-2 rounded shadow-xl min-w-[160px]
142- animate-fade-in
143+ absolute z-[100] mt-1 w-full bg-surface-white border border-surface-gray-2 rounded shadow-xl min-w-[160px] max-h-50 animate-fade-in overflow-auto
143144 ` }
144145 >
145146 { filteredOptions . length === 0 && (
You can’t perform that action at this time.
0 commit comments