🐛 répare le comportement de l'autocomplète de commune au click
parent
78e7adc7ae
commit
26c15baa2b
|
@ -150,8 +150,8 @@ export default function Select({ onChange, value }) {
|
|||
<input
|
||||
role="combobox"
|
||||
type="search"
|
||||
onBlur={submitFocusedElem}
|
||||
aria-autocomplete="list"
|
||||
onBlur={submitFocusedElem}
|
||||
aria-readonly="true"
|
||||
css={noResult ? 'border-color: firebrick !important' : ''}
|
||||
className="ui__"
|
||||
|
@ -186,9 +186,14 @@ export default function Select({ onChange, value }) {
|
|||
const nom = formatCommune(result)
|
||||
return (
|
||||
<Option
|
||||
onMouseDown={
|
||||
// Prevent input blur and focus elem selection
|
||||
e => e.preventDefault()
|
||||
}
|
||||
onClick={() => handleSubmit(result)}
|
||||
role="option"
|
||||
focused={i === focusedElem}
|
||||
data-role="commune-option"
|
||||
key={nom}
|
||||
onFocus={() => setFocusedElem(i)}
|
||||
>
|
||||
|
|
|
@ -7,6 +7,11 @@ type OverlayProps = React.HTMLAttributes<HTMLDivElement> & {
|
|||
xPosition?: number
|
||||
children: React.ReactNode
|
||||
}
|
||||
declare global {
|
||||
interface Window {
|
||||
parentIFrame?: any
|
||||
}
|
||||
}
|
||||
|
||||
const useIFrameOffset = () => {
|
||||
const [offsetTop, setOffset] = useState<number | null>(null)
|
||||
|
|
Loading…
Reference in New Issue