Closed jyothi530 closed 2 years ago
At this time, only CDS form elements (or a custom element with a cds-control
attribute on it) render inside of a cds-form-group.
Because of the CSS used to lay things out, you're right that having an angular component wrapper in the DOM tree messes up the layout. Some amount of working around the issue is possible, I made a few changes to your demo, such as adding cds-control
to the h3 elements, and adding cds-layout="vertical gap:lg"
to your custom components - this mimics the gap that is used in the cds-form-group.
https://stackblitz.com/edit/clarity-light-theme-clr13-cds6-gedwte
Hi there 👋, this is an automated message. To help Clarity keep track of discussions, we automatically lock closed issues after 14 days. Please look for another open issue or open a new issue with updated details and reference this one as necessary.
Describe the bug
<cds-form-group>
.<cds-form-group>
are not displayed and a lot of whitespace is shown. When displayed the alignment is not proper.<cds-form-group>
elements are required to resolve the alignment issue where only one is required for the entire form.How to reproduce
Please take a look at the stackblitz.
In the stackblitz, I am having a form with two reusable components,
<general-info>
,<description>
. Elements defined with in the reusable components when rendered, the control width is shrinked. "Description", "ISO Location" alignments are different even though the html used to render both of them is same.The Details section is separated with a
<hr/>
tag which is not rendered even though it is present in the DOM. Lot of white space seen. We can use<cds-divider>
component, but the General section and the Details section divider is not aligned when using the reusable component.We are able to resolve the issues by having reusable components containing their own
<cds-form-group>
and in the main form component, create multiple form groups before and after a reusable component. Now the problem is the spacing between form group elements is not proper and they look like overlapped (WorkRegion, ProjectManager. WayBill, Description, ISO Location).Expected behavior
Versions
Clarity project:
Clarity version:
Framework:
Framework version: Angular 13
Device:
Additional notes
We built all of our forms using
@clr/angular
and wanted to migrate to@cds/core
,@cds/angular
. All the forms use similar reusable components and the structure as defined in the stackblitz. We started the POC for migration and these are some major issues observed. Appreciate your response on the issue