ScrollViewViewConfig.js 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /**
  2. * Copyright (c) Facebook, Inc. and its affiliates.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. *
  7. * @flow strict-local
  8. * @format
  9. */
  10. 'use strict';
  11. import type {GeneratedViewConfig} from '../../Utilities/registerGeneratedViewConfig';
  12. const ScrollViewViewConfig = {
  13. uiViewClassName: 'RCTScrollView',
  14. bubblingEventTypes: {},
  15. directEventTypes: {
  16. topScrollToTop: {
  17. registrationName: 'onScrollToTop',
  18. },
  19. },
  20. validAttributes: {
  21. alwaysBounceHorizontal: true,
  22. alwaysBounceVertical: true,
  23. automaticallyAdjustContentInsets: true,
  24. bounces: true,
  25. bouncesZoom: true,
  26. canCancelContentTouches: true,
  27. centerContent: true,
  28. contentInset: {diff: require('../../Utilities/differ/pointsDiffer')},
  29. contentOffset: {diff: require('../../Utilities/differ/pointsDiffer')},
  30. contentInsetAdjustmentBehavior: true,
  31. decelerationRate: true,
  32. directionalLockEnabled: true,
  33. disableIntervalMomentum: true,
  34. endFillColor: {process: require('../../StyleSheet/processColor')},
  35. fadingEdgeLength: true,
  36. indicatorStyle: true,
  37. keyboardDismissMode: true,
  38. maintainVisibleContentPosition: true,
  39. maximumZoomScale: true,
  40. minimumZoomScale: true,
  41. nestedScrollEnabled: true,
  42. onMomentumScrollBegin: true,
  43. onMomentumScrollEnd: true,
  44. onScroll: true,
  45. onScrollBeginDrag: true,
  46. onScrollEndDrag: true,
  47. onScrollToTop: true,
  48. overScrollMode: true,
  49. pagingEnabled: true,
  50. persistentScrollbar: true,
  51. pinchGestureEnabled: true,
  52. scrollEnabled: true,
  53. scrollEventThrottle: true,
  54. scrollIndicatorInsets: {
  55. diff: require('../../Utilities/differ/pointsDiffer'),
  56. },
  57. scrollPerfTag: true,
  58. scrollToOverflowEnabled: true,
  59. scrollsToTop: true,
  60. sendMomentumEvents: true,
  61. showsHorizontalScrollIndicator: true,
  62. showsVerticalScrollIndicator: true,
  63. snapToAlignment: true,
  64. snapToEnd: true,
  65. snapToInterval: true,
  66. snapToOffsets: true,
  67. snapToStart: true,
  68. zoomScale: true,
  69. DEPRECATED_sendUpdatedChildFrames: true,
  70. },
  71. };
  72. module.exports = (ScrollViewViewConfig: GeneratedViewConfig);