[Bug]: Not specifying a label on an AttributeEditor definition throws off alignment
See original GitHub issueBrowser
No response
Package version
v3.0.118
React version
v18.2.0
Description
AttributeEditorProps.FieldDefinition
permits for an undefined label, but if you do not define a label then the alignment of the fields is thrown off. As show below
Source code
<AttributeEditor
addButtonText="Add new item"
definition={[
{
label: "Key",
control: (item, index) => (
<Input value={item.key} placeholder="Enter key" />
)
},
{
control: (item, index) => (
<Input value={item.value} placeholder="Enter value" />
)
}
]}
removeButtonText="Remove"
empty="No items associated with the resource."
/>
Reproduction
https://codesandbox.io/s/gallant-voice-m8r48d
Code of Conduct
- I agree to follow this project’s Code of Conduct
- I checked the current issues for duplicate problems
Issue Analytics
- State:
- Created 10 months ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Reusable Blocks: Not receiving alignment attribute in editor ...
Describe the bug I'm attempting to use the shared blocks feature but have hit an editor specific issue with alignfull and alignwide.
Read more >ArcGIS Pro 2.9 Issues Addressed | Esri
3. Issue. Description. BUG-000125994 Rotate symbology fails to update layer rotation field when editing the utility network feature layer.
Read more >Editing Alignment Label Style Causes Internal Error - Civil 3D
I have an alignment label style for the centerline alignment set for the text size and ticks to be the correct size for...
Read more >Don't Use The Placeholder Attribute - Smashing Magazine
One way to associate a label with an input , is to use the for attribute with a value that matches the input's...
Read more >Error codes - CKEditor 5 Documentation
CKEditor 5 Framework logs errors and warnings to the console. The following list contains more detailed descriptions of those issues. alignment-config-classname ...
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
Yes, we are likely to change type definitions when we will be able to.
Closing the request, because currently we have no major version release planned
I see. In that case I’d recommend to not wrap the Attribute Editor in a FormField, since most of the functionality is also exposed on the Attribute Editor directly as part of the
definition
(e.g. constraint text, error state/text, info links).The Typescript interface indeed currently does not enforce the requirement for a label to be present, but this cannot be changed in a backwards-compatible way, so it will not be updated in the current major version.