File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import _ from 'lodash';
8
8
import PropTypes from 'prop-types' ;
9
9
import React from 'react' ;
10
10
import { StyleSheet , Animated , TextInput as RNTextInput , Image as RNImage } from 'react-native' ;
11
+ import memoize from 'memoize-one' ;
11
12
import { Constants } from '../../helpers' ;
12
13
import { Colors , Typography , Spacings } from '../../style' ;
13
14
import BaseInput from '../baseInput' ;
@@ -274,7 +275,7 @@ export default class TextField extends BaseInput {
274
275
}
275
276
} ;
276
277
277
- getPlaceholderText ( ) {
278
+ getPlaceholderText = memoize ( ( ) => {
278
279
// HACK: passing whitespace instead of undefined. Issue fixed in RN56
279
280
const { placeholder, helperText} = this . props ;
280
281
const text = this . shouldFakePlaceholder ( )
@@ -285,7 +286,7 @@ export default class TextField extends BaseInput {
285
286
? helperText
286
287
: this . getRequiredPlaceholder ( placeholder ) ;
287
288
return text ;
288
- }
289
+ } ) ;
289
290
290
291
getStateColor ( colorProp = { } ) {
291
292
const { focused} = this . state ;
You can’t perform that action at this time.
0 commit comments