fix: lint
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
"use client"
|
||||
import { useEffect, useRef, useState, type FocusEvent } from "react"
|
||||
import { useRef } from "react"
|
||||
|
||||
import {
|
||||
Button,
|
||||
@@ -27,18 +27,11 @@ export default function Select({
|
||||
value,
|
||||
}: SelectProps) {
|
||||
const divRef = useRef<HTMLDivElement>(null)
|
||||
const [divElement, setDivElement] = useState(divRef.current)
|
||||
|
||||
function handleOnSelect(key: Key) {
|
||||
onSelect(key, name)
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
if (divRef.current) {
|
||||
setDivElement(divRef.current)
|
||||
}
|
||||
}, [divRef.current])
|
||||
|
||||
return (
|
||||
<div className={styles.date} ref={divRef}>
|
||||
<ReactAriaSelect
|
||||
@@ -63,7 +56,7 @@ export default function Select({
|
||||
* by this component to both access css variables assigned
|
||||
* on the container as well as to not overflow it at any time.
|
||||
*/
|
||||
UNSTABLE_portalContainer={divElement ?? undefined}
|
||||
UNSTABLE_portalContainer={divRef.current ?? undefined}
|
||||
>
|
||||
<ListBox className={styles.listBox}>
|
||||
{items.map((item) => (
|
||||
|
||||
Reference in New Issue
Block a user