mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 12:21:13 -05:00
Fixes
This commit is contained in:
@@ -18,6 +18,7 @@ const OpenRouterModelPicker: React.FC = () => {
|
|||||||
const dropdownRef = useRef<HTMLDivElement>(null)
|
const dropdownRef = useRef<HTMLDivElement>(null)
|
||||||
const itemRefs = useRef<(HTMLDivElement | null)[]>([])
|
const itemRefs = useRef<(HTMLDivElement | null)[]>([])
|
||||||
const [isDescriptionExpanded, setIsDescriptionExpanded] = useState(false)
|
const [isDescriptionExpanded, setIsDescriptionExpanded] = useState(false)
|
||||||
|
const dropdownListRef = useRef<HTMLDivElement>(null)
|
||||||
|
|
||||||
const handleModelChange = (newModelId: string) => {
|
const handleModelChange = (newModelId: string) => {
|
||||||
setApiConfiguration({
|
setApiConfiguration({
|
||||||
@@ -112,6 +113,9 @@ const OpenRouterModelPicker: React.FC = () => {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setSelectedIndex(-1)
|
setSelectedIndex(-1)
|
||||||
|
if (dropdownListRef.current) {
|
||||||
|
dropdownListRef.current.scrollTop = 0
|
||||||
|
}
|
||||||
}, [searchTerm])
|
}, [searchTerm])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -168,7 +172,7 @@ const OpenRouterModelPicker: React.FC = () => {
|
|||||||
)}
|
)}
|
||||||
</VSCodeTextField>
|
</VSCodeTextField>
|
||||||
{isDropdownVisible && (
|
{isDropdownVisible && (
|
||||||
<DropdownList>
|
<DropdownList ref={dropdownListRef}>
|
||||||
{modelSearchResults.map((item, index) => (
|
{modelSearchResults.map((item, index) => (
|
||||||
<DropdownItem
|
<DropdownItem
|
||||||
key={item.id}
|
key={item.id}
|
||||||
|
|||||||
Reference in New Issue
Block a user