Using the module entity extension system, I'm adding a few custom properties to the Plan entity from the Payment Module. That works as expected except for one of the properties, where I need the field in the UI to allow multiple lines (text area), but instead in the UI the field is still rendered as a simple single line text input, not allowing me to input what I need.
According to the documentation:
DataTypeAttribute
is used to specify the type of the property. It is used to determine how to render the property on the user interface
So, my understanding was that by setting the data type of my property to DataType.MultilineText
as shown below, it should result in a text area field where I can type multiple lines of text, but that is not the case. Am I missing something?
Here's my custom property definition:
ObjectExtensionManager.Instance.Modules()
.ConfigurePayment(payment =>
{
payment.ConfigurePlan(plan => plan
.AddOrUpdateProperty<string>("Features", property =>
{
property.DisplayName = LocalizableString.Create<PaymentGatewayResource>("PlanFeatures");
property.Attributes.Add(new DataTypeAttribute(DataType.MultilineText));
property.UI.OnTable.IsVisible = false;
})
);
});
- Steps to reproduce the issue:
- Add new custom property to entity as shown in the code above
- Verify in the UI that the field is a simple input instead of a text area, not allowing the user to input multiple lines of text
1 Answer(s)
-
0
Hi, when you use module entity extensions, ABP renders the
ExtensionProperties
component (https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.BlazoriseUI/Components/ObjectExtending/ExtensionProperties.razor) on the create/edit models.So, my understanding was that by setting the data type of my property to as shown below, it should result in a text area field where I can type multiple lines of text, but that is not the case.
You are right that when you use the
DataType.MultilineText
, it should have rendered a textarea (MemoEdit
component in Blazorise), but it seems currently it's not supported (see for current data-type equivalent components: https://github.com/abpframework/abp/blob/24b3bf2b79f5a973948a5f6d4cfcae891e216f01/framework/src/Volo.Abp.BlazoriseUI/BlazoriseUiObjectExtensionPropertyInfoExtensions.cs#L231-L249).I've created an issue for that: https://github.com/abpframework/abp/issues/22935
Regards.