scrollResponderScrollToEnd: function()

in deprecated-react-native-listview/ScrollResponder.js [534:549]


  scrollResponderScrollToEnd: function(options?: {animated?: boolean, ...}) {
    // Default to true
    const animated = (options && options.animated) !== false;

    const that: React.ElementRef<ScrollView> = (this: any);
    invariant(
      that.getNativeScrollRef != null,
      'Expected scrollToEnd to be called on a scrollViewRef. If this exception occurs it is likely a bug in React Native',
    );
    const nativeScrollRef = that.getNativeScrollRef();
    if (nativeScrollRef == null) {
      return;
    }

    Commands.scrollToEnd(nativeScrollRef, animated);
  },