mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 14:43:46 +01:00
visual updates to optional fields in manual bib entry (#33102)
* visual updates to optional fields in manual bib entry * omitting onClose from button auto complete props GitOrigin-RevId: 922695e8eaec83702b482123dc4b4483fe957b78
This commit is contained in:
committed by
Copybot
parent
7eee5809bb
commit
6b78b42469
@@ -32,6 +32,7 @@ export type OLAutocompleteProps = {
|
||||
useFuzzySearch?: boolean
|
||||
inputRef?: React.ForwardedRef<HTMLInputElement>
|
||||
expandUp?: boolean
|
||||
onClose?: () => void
|
||||
}
|
||||
|
||||
type OLAutocompleteDisplayItem =
|
||||
@@ -57,6 +58,7 @@ function OLAutocompleteInternal({
|
||||
useFuzzySearch = false,
|
||||
inputRef,
|
||||
expandUp = false,
|
||||
onClose,
|
||||
}: OLAutocompleteProps) {
|
||||
const { t } = useTranslation()
|
||||
|
||||
@@ -178,6 +180,11 @@ function OLAutocompleteInternal({
|
||||
onInputValueChange: ({ inputValue = '' }) => {
|
||||
setInternalInputValue(inputValue)
|
||||
},
|
||||
onIsOpenChange: ({ isOpen }) => {
|
||||
if (!isOpen) {
|
||||
onClose?.()
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
const shouldShowDropdown = isOpen && displayItems.length > 0
|
||||
|
||||
Reference in New Issue
Block a user