Skip to content

fix: patch label of textfield when it's not a string - #2851

Merged
Keith-CY merged 1 commit into
developfrom
patch-label-of-textfield
Sep 27, 2023
Merged

fix: patch label of textfield when it's not a string#2851
Keith-CY merged 1 commit into
developfrom
patch-label-of-textfield

Conversation

@Keith-CY

Copy link
Copy Markdown
Contributor

This PR patches the label of a textfield by a fallback that uses a field name. It should be fixed in the next release that label should be limited to a string because it has its own semantic meaning.

Before
image
After
image

}: {
field: string
label?: string
label?: string | React.ReactNode

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps it could be implemented as label?: string | { node: ReactNode; text: string }

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps it could be implemented as label?: string | { node: ReactNode; text: string }

I think label should be strictly limited to string, so the definition will be recovered to string, and if a pre-component is necessary, an independent field as prefix/suffix/preTab/postTab can be added

@silySuper

silySuper commented Sep 26, 2023

Copy link
Copy Markdown

/package
Packaging for test is done in 6307373693. @silySuper

@Keith-CY
Keith-CY merged commit 1b0f290 into develop Sep 27, 2023
@Keith-CY
Keith-CY deleted the patch-label-of-textfield branch September 27, 2023 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants