Skip to content

Conversation

@thatblindgeye
Copy link
Contributor

What: Closes #7938

Additional issues:
Followup from discussion related to #7810

@patternfly-build
Copy link
Collaborator

patternfly-build commented Sep 6, 2022

Comment on lines +91 to +93
* public componentDidMount() {
* this.observer = getResizeObserver(this.inputRef.current, debounce(this.handleResize, 250), false);
* }
Copy link
Member

@dlabrecq dlabrecq Sep 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thinking we can simplify the examples?

There are currently 4 full examples, but the only change seems to be in componentDidMount, so perhaps we can just show how that method? For example, something more like this might be enough:

Example 3 - With debounced method passed in

public componentDidMount() {
  this.observer = getResizeObserver(this.inputRef.current, debounce(this.handleResize, 250), false);
}

Copy link
Contributor

@tlabaj tlabaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tlabaj tlabaj merged commit de743fb into patternfly:main Sep 7, 2022
andyyvo pushed a commit to andyyvo/patternfly-react that referenced this pull request Sep 9, 2022
…patternfly#7941)

* feat(resizeObserver): allow opting out of using requestAnimationFrame

* Update examples
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

resizeObserver - allow opting out of using requestAnimationFrame

5 participants