1
1
import PropTypes from 'prop-types' ;
2
- import React , { forwardRef } from 'react' ;
3
- import { ScrollView , View } from 'react-native' ;
2
+ import React from 'react' ;
3
+ import { View } from 'react-native' ;
4
4
import _ from 'underscore' ;
5
- import htmlRendererPropTypes from '@components/HTMLEngineProvider/HTMLRenderers/htmlRendererPropTypes' ;
6
5
import PressableWithoutFeedback from '@components/Pressable/PressableWithoutFeedback' ;
7
6
import { ShowContextMenuContext , showContextMenuForReport } from '@components/ShowContextMenuContext' ;
8
7
import withLocalize from '@components/withLocalize' ;
9
8
import useThemeStyles from '@hooks/useThemeStyles' ;
10
9
import * as ReportUtils from '@libs/ReportUtils' ;
11
10
import CONST from '@src/CONST' ;
11
+ import htmlRendererPropTypes from './htmlRendererPropTypes' ;
12
12
13
13
const propTypes = {
14
14
/** Press in handler for the code block */
@@ -31,20 +31,14 @@ const defaultProps = {
31
31
onPressOut : undefined ,
32
32
} ;
33
33
34
- const BasePreRenderer = forwardRef ( ( props , ref ) => {
34
+ function PreRenderer ( props ) {
35
35
const styles = useThemeStyles ( ) ;
36
36
const TDefaultRenderer = props . TDefaultRenderer ;
37
37
const defaultRendererProps = _ . omit ( props , [ 'TDefaultRenderer' , 'onPressIn' , 'onPressOut' , 'onLongPress' ] ) ;
38
38
const isLast = props . renderIndex === props . renderLength - 1 ;
39
39
40
40
return (
41
- < ScrollView
42
- ref = { ref }
43
- horizontal
44
- style = { [ isLast ? styles . mt2 : styles . mv2 , styles . overscrollBehaviorXNone ] }
45
- bounces = { false }
46
- keyboardShouldPersistTaps = "always"
47
- >
41
+ < View style = { [ isLast ? styles . mt2 : styles . mv2 ] } >
48
42
< ShowContextMenuContext . Consumer >
49
43
{ ( { anchor, report, action, checkIfContextMenuActive} ) => (
50
44
< PressableWithoutFeedback
@@ -61,12 +55,12 @@ const BasePreRenderer = forwardRef((props, ref) => {
61
55
</ PressableWithoutFeedback >
62
56
) }
63
57
</ ShowContextMenuContext . Consumer >
64
- </ ScrollView >
58
+ </ View >
65
59
) ;
66
- } ) ;
60
+ }
67
61
68
- BasePreRenderer . displayName = 'BasePreRenderer ' ;
69
- BasePreRenderer . propTypes = propTypes ;
70
- BasePreRenderer . defaultProps = defaultProps ;
62
+ PreRenderer . displayName = 'PreRenderer ' ;
63
+ PreRenderer . propTypes = propTypes ;
64
+ PreRenderer . defaultProps = defaultProps ;
71
65
72
- export default withLocalize ( BasePreRenderer ) ;
66
+ export default withLocalize ( PreRenderer ) ;
0 commit comments