-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
localizing the scope of the resize handler #3265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -14,7 +14,7 @@ const ResizeDetector = props => { | |||
if (resizeTimeout) { | |||
clearTimeout(resizeTimeout); | |||
} | |||
resizeTimeout = setTimeout(() => { | |||
var resizeTimeout = setTimeout(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be replaced with let
and remove the global one on line 7.
@@ -205,5 +206,6 @@ def update_figures(n_clicks): | |||
dash_dcc.wait_for_text_to_equal("#generate-btn", "Generate Figures") | |||
dash_dcc.find_element("#generate-btn").click() | |||
dash_dcc.wait_for_text_to_equal("#bounding-output", "loaded") | |||
time.sleep(.1) ## must wait for the full render |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Always a bit skeptical of adding artificial sleeps to load times. Is there any way we can actually await the full render?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The components are there immediately, the debounce has a 50ms delay. I'm not sure there is a way to handle this.
I'm open to figuring out how to delay and wait for something on the screen to demonstrate the proper sizing. XD
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💃
localizing the scope of the resize handler