-
Notifications
You must be signed in to change notification settings - Fork 8
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
Admin Generator (Future): Add support for startAdornments
and endAdornments
for form fields
#2636
base: main
Are you sure you want to change the base?
Admin Generator (Future): Add support for startAdornments
and endAdornments
for form fields
#2636
Conversation
…pe: text, number, numberRange, date
packages/admin/cms-admin/src/generator/future/generateForm/generateFormField.ts
Show resolved
Hide resolved
.changeset/shaggy-waves-fix.md
Outdated
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.
Thanks for the changeset! However, we decided that we don't add changesets for the Admin Generator. So please remove/adapt it.
startAdornment?: ReactNode; | ||
endAdornment?: ReactNode; |
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.
This should be added do the changeset I suppose. Also, aren't these props part of InputWithPopperProps?
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.
Yes, they are. I need to pay more attention to the existing props... Changeset will be updated.
packages/admin/cms-admin/src/generator/future/generateForm/generateFormField.ts
Outdated
Show resolved
Hide resolved
…min Generator change
packages/admin/cms-admin/src/generator/future/generateForm/generateFormField.ts
Outdated
Show resolved
Hide resolved
…icker', to not break other uses of 'DatePicker'
Description
Added support for
startAdornments
andendAdornments
for generated form fields.Adornments started being added in #2612 and are now implemented for all fields where deemed useful.
As of right now, the following field types support adornments:
text
,number
,numberRange
,date
select
andasyncSelect
will be done in a follow-up PR: #2645DatePicker changes: All
DatePicker
uses have been checked and do not lead to issues or errors.Example
There are three ways to define an adornment: as just a
string
, an object with an icon namestring
or as an object with options.Example with just a string:
Example with an icon name:
Example with an object:
These lead to generated fields in the form like this:
Screenshots/screencasts
The Two examples from above are marked in the screenshot
Changeset
Related tasks and documents
https://vivid-planet.atlassian.net/browse/COM-1170
Open TODOs/questions