Unable to override textboxView style
See original GitHub issueVersion
- tcomb-form-native v^0.6.3
- react-native v0.34.1
I’m attempting to override the styles of the textboxView components in my form. Specifically using the documentation for the material design found here: https://github.com/gcanti/tcomb-form-native/blob/master/docs/STYLESHEETS.md#material-design-style-underlines
When I add the new styles for textboxView
I get the following error:
Cannot read property 'normal' of undefined
Here’s the relevant code:
const t = require('tcomb-form-native');
const Form = t.form.Form;
const _ = require('lodash');
const stylesheet = _.cloneDeep(Form.stylesheet);
stylesheet.textbox.normal.borderWidth = 0;
stylesheet.textbox.error.borderWidth = 0;
stylesheet.textbox.normal.marginBottom = 0;
stylesheet.textbox.error.marginBottom = 0;
stylesheet.textboxView.normal.borderWidth = 0;
stylesheet.textboxView.error.borderWidth = 0;
stylesheet.textboxView.normal.borderRadius = 0;
stylesheet.textboxView.error.borderRadius = 0;
stylesheet.textboxView.normal.borderBottomWidth = 1;
stylesheet.textboxView.error.borderBottomWidth = 1;
stylesheet.textbox.normal.marginBottom = 5;
stylesheet.textbox.error.marginBottom = 5;
const Person = t.struct({
email: t.String,
username: t.String,
password: t.String
});
const options = {
stylesheet: stylesheet,
auto: 'placeholders',
fields: {
email: {
autoFocus: true,
autoCapitalize: 'none'
},
username: {
autoCapitalize: 'none'
},
password: {
password: true,
secureTextEntry: true
}
}
};
It’s only throwing an error on the textboxView
lines. textbox
works fine.
Any help at all would be much appreciated. Thank you!
Issue Analytics
- State:
- Created 7 years ago
- Comments:5
Top Results From Across the Web
Can't override a global WPF style that is set by TargetType on ...
I've tried setting Style to {x:Null}, setting custom font sizes inline, and setting a style in the resources of this control. None take ......
Read more >textBox padding - MSDN - Microsoft
--> On my machine, I see extra white space between the left border and contained text, i.e. text is not flush with the...
Read more >[Solved] Inserting a text box - (View topic)
Try Insert> Frame . The frame is use for both text and graphics. HTH. OpenOffice.org v3.3, LibO v3.32 on Ubuntu 10.10 and Win7....
Read more >In this lesson, we will learn about the View Manager.
Text Box: View Manager ... Style – Access component displays ... If a change needs to happen to the child in your rep,...
Read more >How to remove margins in cell editors - DevExpress Support
If you decided to use CellTemplate, override this style: ... default margin on the TextBoxView element ("2,0,2,0") and we cannot remove this ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m having the same issue with 0.6.4.
@jaredtibs @carly-lee I have the same issue. it not work after I upgraded tcomb-form-native. but I fixed the issue by
yarn remove tcomb-form-native
andyarn add tcomb-form-native
. if you guys not use yarn,npm uninstall tcomb-form-native
andnpm install tcomb-form-native
might help you.