From 59f6fe12ff0732401a29f376cb5b4222f828c59e Mon Sep 17 00:00:00 2001 From: Matchu Date: Mon, 31 Aug 2020 01:04:27 -0700 Subject: [PATCH] remeasure pose picker after changing appearance --- src/app/WardrobePage/support/PosePickerSupport.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/WardrobePage/support/PosePickerSupport.js b/src/app/WardrobePage/support/PosePickerSupport.js index ae6c7d6..8b4d728 100644 --- a/src/app/WardrobePage/support/PosePickerSupport.js +++ b/src/app/WardrobePage/support/PosePickerSupport.js @@ -43,7 +43,8 @@ function PosePickerSupport({ ); // Resize the Popover when we toggle loading state, because it probably will - // affect the content size. + // affect the content size. appearanceId might also affect content size, if + // it occupies different zones. // // NOTE: This also triggers an additional necessary resize when the component // first mounts, because PosePicker lazy-loads it, so it actually @@ -54,7 +55,7 @@ function PosePickerSupport({ // I've also filed an issue requesting an official API! // https://github.com/chakra-ui/chakra-ui/issues/1853 window.dispatchEvent(new Event("resize")); - }, [loading]); + }, [loading, appearanceId]); if (loading) { return (