-
Notifications
You must be signed in to change notification settings - Fork 736
TextField and Switch/ forward id prop #2608
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,6 +46,7 @@ const TextField = (props: InternalTextFieldProps) => { | |
const { | ||
modifiers, | ||
// General | ||
containerId, | ||
fieldStyle: fieldStyleProp, | ||
dynamicFieldStyle, | ||
containerStyle, | ||
|
@@ -123,7 +124,7 @@ const TextField = (props: InternalTextFieldProps) => { | |
|
||
return ( | ||
<FieldContext.Provider value={context}> | ||
<View style={[margins, positionStyle, containerStyle, centeredContainerStyle]}> | ||
<View id={containerId} style={[margins, positionStyle, containerStyle, centeredContainerStyle]}> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I suggest changing it to |
||
<Label | ||
label={label} | ||
labelColor={labelColor} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -164,6 +164,10 @@ export type TextFieldProps = MarginModifiers & | |
// FieldStateProps & | ||
ValidationMessageProps & | ||
Omit<CharCounterProps, 'maxLength' | 'testID'> & { | ||
/** | ||
* Pass id to the container | ||
*/ | ||
containerId?: string; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See my other comment about the name :) |
||
/** | ||
* Pass to render a leading element | ||
*/ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it's a leftover, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, i can open a different PR for it.. but the prop is passed to the component.
we should also type it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can leave it here, please add it to the Switch's API file and I'll update the PR's changelog and name :)