Skip to content

Commit

Permalink
Merge branch 'hotfix/v3.0.1' into feature/translations-3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexeySafronov committed Dec 12, 2024
2 parents 65e226b + 552fd47 commit 784c18b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/client/src/components/AccessSelector/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,15 @@ const AccessSelector: React.FC<AccessSelectorProps> = ({
const [horizontalOrientation, setHorizontalOrientation] = useState(false);
const [width, setWidth] = useState(manualWidth || 0);

const offsetWidth = containerRef?.current?.offsetWidth;

useEffect(() => {
if (!offsetWidth) {
const offsetWidth = containerRef?.current?.offsetWidth;

if (typeof offsetWidth !== "number") {
return;
}

setWidth(offsetWidth - 32);
}, [offsetWidth]);
}, [containerRef, containerRef?.current?.offsetWidth]);

const accessOptions = getAccessOptions(
t,
Expand Down

0 comments on commit 784c18b

Please sign in to comment.