File tree 3 files changed +3
-12
lines changed 3 files changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -190,6 +190,7 @@ class BaseTextInput extends Component {
190
190
const hasLabel = Boolean ( this . props . label . length ) ;
191
191
const inputHelpText = this . props . errorText || this . props . hint ;
192
192
const formHelpStyles = this . props . errorText ? styles . formError : styles . formHelp ;
193
+ const placeholder = ( this . props . prefixCharacter || this . state . isFocused || ! hasLabel || ( hasLabel && this . props . forceActiveLabel ) ) ? this . props . placeholder : null ;
193
194
const textInputContainerStyles = _ . reduce ( [
194
195
styles . textInputContainer ,
195
196
...this . props . textInputContainerStyles ,
@@ -251,16 +252,7 @@ class BaseTextInput extends Component {
251
252
// eslint-disable-next-line
252
253
{ ...inputProps }
253
254
defaultValue = { this . state . value }
254
- placeholder = {
255
- (
256
- this . props . prefixCharacter
257
- || this . state . isFocused
258
- || ! hasLabel
259
- || ( hasLabel && this . props . forceActiveLabel )
260
- )
261
- ? this . props . placeholder
262
- : null
263
- }
255
+ placeholder = { placeholder }
264
256
placeholderTextColor = { themeColors . placeholderText }
265
257
underlineColorAndroid = "transparent"
266
258
style = { [
Original file line number Diff line number Diff line change @@ -57,7 +57,6 @@ const propTypes = {
57
57
prefixCharacter : PropTypes . string ,
58
58
59
59
/** Form props */
60
-
61
60
/** Indicates that the input is being used with the Form component */
62
61
isFormInput : PropTypes . bool ,
63
62
Original file line number Diff line number Diff line change @@ -25,9 +25,9 @@ const parser = new ExpensiMark();
25
25
const Default = ( args ) => {
26
26
const [ pastedFile , setPastedFile ] = useState ( null ) ;
27
27
const [ comment , setComment ] = useState ( args . defaultValue ) ;
28
- const renderedHTML = parser . replace ( comment ) ;
29
28
const [ droppingFile , setDroppingFile ] = useState ( false ) ;
30
29
const [ isComposerDroppingTarget , setIsComposerDroppingTarget ] = useState ( false ) ;
30
+ const renderedHTML = parser . replace ( comment ) ;
31
31
32
32
return (
33
33
< View >
You can’t perform that action at this time.
0 commit comments