react-native-material-textfield icon indicating copy to clipboard operation
react-native-material-textfield copied to clipboard

`defaultValue` is greyed out

Open syky27 opened this issue 5 years ago • 8 comments

Hi,

Thank you for bringing this back to life, great job!

Anyways, when I use defaultValue to get updates as the var changes, the Textfield value is greyedout.

  const customer: Customer = useSelector(state => state.customers.selected)

. . .

  <TextField
    label='Name'
    tintColor={Theme.COLORS.BUTTON_COLOR}
    defaultValue={customer ? customer.name : 'NaN'}
    editable={true}
    onChangeText={text => setName(text)}
  />

This is what it looks like Screenshot 2019-10-23 01 48 54 This is what I think it should look like

Screenshot 2019-10-23 01 49 01

Thank you!

syky27 avatar Oct 22 '19 23:10 syky27

Same issue here. There's no reason to present a value as a placeholder, and no way to alter the color of it without changing the whole color of the input.

shamilovtim avatar Nov 08 '19 23:11 shamilovtim

@syky27 Did you ever figure out a solution to this?

greatwitenorth avatar Mar 16 '20 20:03 greatwitenorth

just use my fork

shamilovtim avatar Mar 16 '20 20:03 shamilovtim

Is this going to be merged?

Fallup avatar May 11 '20 08:05 Fallup

The repo doesn't have commits since oct. Feel free to use my fork, it has this commit.

shamilovtim avatar May 11 '20 13:05 shamilovtim

The repo doesn't have commits since oct. Feel free to use my fork, it has this commit.

Yup, I saw the repo status, but wanted to ask anyway. Thanks, but I'm already using the fix with help of patch-package which I prefer more than foreign repos.

Fallup avatar May 11 '20 16:05 Fallup

@greatwitenorth sorry, not without hotfixing this package. And decided I am not touching react native ever again. 🤢

syky27 avatar May 11 '20 17:05 syky27

@greatwitenorth just give the style={{color:"#000"}} that works for me

rahmath30 avatar Feb 14 '21 04:02 rahmath30