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

Add Material TextField

Open adrianicv opened this issue 7 years ago • 11 comments

According to #78, we needed an implementation of material textfields. I've implemented and approach based on https://github.com/n4kz/react-native-material-textfield/ repository but I've changed the API in order to fit the react native-material-ui philosophy getting the styles from the theme and changing other minor aspects. This is a first version, maybe after some usage we will detect some bugs and upgrades, but I think, for now, this is functional enough.

@xotahal please check it, and if there aren't any problems merge it.

Thank you.

adrianicv avatar Dec 12 '17 09:12 adrianicv

Codecov Report

Merging #245 into master will decrease coverage by 1.98%. The diff coverage is 69.38%.

@@            Coverage Diff             @@
##           master     #245      +/-   ##
==========================================
- Coverage   76.61%   74.62%   -1.99%     
==========================================
  Files          19       25       +6     
  Lines         774     1068     +294     
  Branches      113      190      +77     
==========================================
+ Hits          593      797     +204     
- Misses        150      221      +71     
- Partials       31       50      +19

codecov-io avatar Dec 12 '17 09:12 codecov-io

Tests are not passing...

piranna avatar Dec 23 '17 13:12 piranna

@piranna, tests are passing as you can see in the details of ci/circleci. Nevertheless, coverage checks are not passing due to a reduction in the global coverage after the possible merge.

I agree that we should improve testing coverage, but now all tests, including master's tests, are only covering all the possible combination of snapshots without changes of state or interaction with the components. So, I think that this PR can be merged even if it reduces the global coverage and include in the roadmap the improvement of the tests.

adrianicv avatar Dec 26 '17 08:12 adrianicv

@adrianicv @piranna any news on this PR?

canercandan avatar Feb 07 '18 03:02 canercandan

@adrianicv @piranna any news on this PR?

No, just waiting to get it merged.

piranna avatar Feb 07 '18 08:02 piranna

Sorry guys, I will try to look at this soon. I was moving to New Zealand. So I didn't have so much time ..

xotahal avatar Feb 07 '18 08:02 xotahal

Experiencing this error when compiling production apk using this pull request branch using RN-0.55.4.

com.facebook.react.common.JavascriptException: undefined is not an object (evaluating 's.View.propTypes.style'), stack:

As suggested by this issue, I searched in node_modules and found View.propTypes.style in TextField.react.js.

I suggest to use ViewPropTypes in utils instead.

import { ViewPropTypes } from '../utils';

....
style: PropTypes.shape({
        inputContainer: ViewPropTypes.style,
        container: ViewPropTypes.style,
        labelText: Text.propTypes.style,
        titleText: Text.propTypes.style,
        affixText: Text.propTypes.style,
        input: TextInput.propTypes.style,
}),

I've forked another branch to try. Let me know what you guys think @adrianicv @xotahal. I can help create another pr.

charleswong28 avatar Jun 06 '18 13:06 charleswong28

@xotahal any updates on this?

sraka1 avatar Feb 19 '19 14:02 sraka1

I would find this useful. Are there plans to merge this?

brno32 avatar Jul 19 '19 04:07 brno32

Any updates on this?

mixa9269 avatar May 15 '20 14:05 mixa9269

I was learning React back when I found this issue and made the above comment. Now I found a job as a react dev. Any updates?

brno32 avatar May 15 '20 14:05 brno32