UNPKG

react-native-charts-wrapper

Version:
15 lines (13 loc) 458 B
import React, {Component} from 'react'; import { UIManager, findNodeHandle} from 'react-native'; export default function ScrollEnhancer(Chart) { return class ScrollExtended extends Chart { setDataAndLockIndex(data) { UIManager.dispatchViewManagerCommand( findNodeHandle(this.getNativeComponentRef()), UIManager.getViewManagerConfig(this.getNativeComponentName()).Commands.setDataAndLockIndex, [data] ); } } }