File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed
src/packages/admin-ui-components/src/combo-box Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,6 @@ export const ComboBox = ({
9494 // Store the selected ids in a set for easy lookup - this is our source of truth for selection
9595 const selectedIds = useMemo ( ( ) => new Set ( valueArray . map ( ( item ) => item . value ) ) , [ valueArray ] ) ;
9696
97-
9897 const sortOptionsBySelectedFirst = ( opt1 : SelectOption , opt2 : SelectOption ) => {
9998 return ( selectedIds . has ( opt2 . value ) ? 1 : 0 ) - ( selectedIds . has ( opt1 . value ) ? 1 : 0 )
10099 }
@@ -362,7 +361,7 @@ export const ComboBox = ({
362361 ) : (
363362 < >
364363 {
365- // The sort function bumps any selected options to the top of the list.
364+ // Bump selected options to the top of the list.
366365 options . sort ( sortOptionsBySelectedFirst ) . map ( ( item , index ) => {
367366 const isSelected = selectedIds . has ( item . value ) ;
368367 const testId = `${ isSelected ? 'selected' : 'combo' } -option-${ item . label } `
Original file line number Diff line number Diff line change 253253 transition : background-color 0.2s ease;
254254}
255255
256- .selectedOptionHighlighted , . selectedOption : hover {
256+ .selectedOptionHighlighted {
257257 background-color : var (--color-red );
258258}
259259
You can’t perform that action at this time.
0 commit comments