MCPcopy Create free account
hub / github.com/shoutem/ui / componentDidUpdate

Method componentDidUpdate

components/TabMenu/TabMenu.js:28–34  ·  view source on GitHub ↗
(prevProps)

Source from the content-addressed store, hash-verified

26 }
27
28 componentDidUpdate(prevProps) {
29 const { selectedOption } = this.props;
30
31 if (prevProps.selectedOption !== selectedOption) {
32 this.scrollToSelectedItem();
33 }
34 }
35
36 scrollToSelectedItem() {
37 const { selectedOption, options } = this.props;

Callers

nothing calls this directly

Calls 1

scrollToSelectedItemMethod · 0.95

Tested by

no test coverage detected