Skip to content
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

dynamicFormTagHelper add Column attribute #16111

Merged
merged 5 commits into from
Apr 11, 2023

Conversation

blackWins
Copy link
Contributor

@blackWins blackWins commented Mar 28, 2023

Description

add new attribute Column to dynamicFormTagHelper
before:
image

after:
image

Checklist

  • I fully tested it as developer / designer and created unit / integration tests
  • I documented it (or no need to document or I will create a separate documentation issue)

How to test it?

add abp-column to abp-dynamic-form tag

<abp-dynamic-form abp-model="@Model.MyDetailedModel" abp-column="2"/>

@@ -12,6 +12,9 @@ public class AbpDynamicFormTagHelper : AbpTagHelper<AbpDynamicFormTagHelper, Abp
[HtmlAttributeName("abp-model")]
public ModelExpression Model { get; set; }

[HtmlAttributeName("abp-column")]
public int Column { get; set; }
Copy link
Member

Choose a reason for hiding this comment

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

@@ -108,6 +108,10 @@ See the [dynamic forms demo page](https://bootstrap-taghelpers.abp.io/Components

Sets the c# model for dynamic form. Properties of this modal are turned into inputs in the form.

### abp-column

Set up columns in a dynamic form. The value is between 1~6 .
Copy link
Member

Choose a reason for hiding this comment

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

It would be good if we say this size is used for col-sm.

@@ -12,6 +12,9 @@ public class AbpDynamicFormTagHelper : AbpTagHelper<AbpDynamicFormTagHelper, Abp
[HtmlAttributeName("abp-model")]
public ModelExpression Model { get; set; }

[HtmlAttributeName("abp-column")]
Copy link
Member

Choose a reason for hiding this comment

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

column-size would be a better name for the attribute.

@yekalkan yekalkan modified the milestones: 7.2-preview, 7.2-final Apr 11, 2023
@yekalkan yekalkan changed the base branch from dev to rel-7.2 April 11, 2023 09:46
@blackWins blackWins requested a review from yekalkan April 11, 2023 10:37
{
return htmlContent;
}

var col_class = $"col-12 col-sm-" + (12 / TagHelper.Column);
var col_class = $"col-12 col-sm-" + TagHelper.ColumnSize;
Copy link
Member

Choose a reason for hiding this comment

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

i tink it should be ((int) TagHelper.ColumnSize)

@ebicoglu ebicoglu changed the base branch from _delete to dev April 11, 2023 10:58
@blackWins blackWins requested a review from yekalkan April 11, 2023 11:17
@yekalkan yekalkan merged commit 74601db into abpframework:dev Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants