question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug]: Not specifying a label on an AttributeEditor definition throws off alignment

See original GitHub issue

Browser

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

image

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

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
just-boriscommented, Dec 23, 2022

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

1reaction
connorlanigancommented, Nov 21, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found