Skip to content

Commit

Permalink
Merge branch 'eh/feat/DHIS2-15475-SwitchToPluginComponent' into eh/fe…
Browse files Browse the repository at this point in the history
…at/DHIS2-16305-EnrollmentOverviewPlugins

# Conflicts:
#	i18n/en.pot
#	yarn.lock
  • Loading branch information
eirikhaugstulen committed Jan 26, 2024
2 parents a27522a + 0d136c4 commit 82d9cb3
Show file tree
Hide file tree
Showing 2 changed files with 2,286 additions and 2,452 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const FormFieldPluginComponent = (props: ComponentProps) => {

useEffect(() => {
const { current: container } = containerRef;
if (!container) return;
if (!container) return () => {};

const resizeObserver = new ResizeObserver((entries) => {
entries.forEach(entry => setPluginWidth(entry.contentRect.width));
Expand All @@ -19,7 +19,6 @@ export const FormFieldPluginComponent = (props: ComponentProps) => {
resizeObserver.observe(container);

// Cleanup function
// eslint-disable-next-line consistent-return
return () => {
resizeObserver.unobserve(container);
resizeObserver.disconnect();
Expand Down
Loading

0 comments on commit 82d9cb3

Please sign in to comment.