mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-15 18:12:47 +03:00
parent
1a01e58b7b
commit
24259dab87
@ -47,6 +47,9 @@ export function Dropdown(props: DropdownProps): ReactElement {
|
||||
const [coords, setCoords] = useState({});
|
||||
|
||||
const updatePos = useCallback(() => {
|
||||
if(!anchorRef.current) {
|
||||
return;
|
||||
}
|
||||
const newCoords = getRelativePosition(anchorRef.current, props.alignX, props.alignY, offsetX, offsetY);
|
||||
if(newCoords) {
|
||||
setCoords(newCoords);
|
||||
|
Loading…
Reference in New Issue
Block a user