feat: add event handling to blur current target element after showing popup
- Added event handling to the onSelectModel function to blur the current target element after showing the SelectModelPopup.
This commit is contained in:
parent
d41667b599
commit
8bb5fb9811
@ -23,7 +23,8 @@ const SelectModelButton: FC<Props> = ({ assistant }) => {
|
|||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
const onSelectModel = async () => {
|
const onSelectModel = async (event: React.MouseEvent<HTMLElement>) => {
|
||||||
|
event.currentTarget.blur()
|
||||||
const selectedModel = await SelectModelPopup.show({ model })
|
const selectedModel = await SelectModelPopup.show({ model })
|
||||||
if (selectedModel) {
|
if (selectedModel) {
|
||||||
setModel(selectedModel)
|
setModel(selectedModel)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user