Skip to content

Commit

Permalink
Add JSDoc comment to Popover's focus() method (#8312)
Browse files Browse the repository at this point in the history
The public focus() method has documentation in the Popover component's
README file, but it would be useful to have it in a JSDoc comment as
well.
  • Loading branch information
noisysocks authored Jul 31, 2018
1 parent 656439c commit d77b92b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/components/src/popover/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,13 @@ class Popover extends Component {
this.rafHandle = window.requestAnimationFrame( () => this.computePopoverPosition() );
}

/**
* Calling `refresh()` will force the Popover to recalculate its size and
* position. This is useful when a DOM change causes the anchor node to change
* position.
*
* @return {void}
*/
refresh() {
const popoverSize = this.updatePopoverSize();
this.computePopoverPosition( popoverSize );
Expand Down

0 comments on commit d77b92b

Please sign in to comment.