Added maximum display length

This commit is contained in:
2025-01-28 10:11:35 +01:00
parent b288d58c5d
commit 193f334708
4 changed files with 38 additions and 11 deletions

View File

@@ -25,6 +25,7 @@ public class PropertyConfig(PropertyInfo info, TableConfig table, int nthPropert
public bool IsEnumerable { get; internal set; }
public bool IsListingProperty { get; set; }
public int Order { get; set; } = nthProperty;
public int DisplayLength { get; set; } = 32;
}
/// <summary>
@@ -190,4 +191,13 @@ public class PropertyConfigurator<TProp>(PropertyConfig config) {
InnerConfig.Order = index;
return this;
}
/// <summary>
/// Sets the maximum character length displayed in the admin ui (not in the editor dialog)
/// </summary>
/// <param name="maxLength">The maximum length of characters to be displayed</param>
public PropertyConfigurator<TProp> SetDisplayLength(int maxLength) {
InnerConfig.DisplayLength = maxLength;
return this;
}
}