-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Conversation
@@ -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; } |
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.
I think we can use ColumnSize
enum here, instead of int.
@@ -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 . |
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.
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")] |
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.
column-size
would be a better name for the attribute.
{ | ||
return htmlContent; | ||
} | ||
|
||
var col_class = $"col-12 col-sm-" + (12 / TagHelper.Column); | ||
var col_class = $"col-12 col-sm-" + TagHelper.ColumnSize; |
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.
i tink it should be ((int) TagHelper.ColumnSize)
Description
add new attribute
Column
todynamicFormTagHelper
before:
after:
Checklist
How to test it?
add
abp-column
toabp-dynamic-form
tag<abp-dynamic-form abp-model="@Model.MyDetailedModel" abp-column="2"/>