_text being set and resetting other options

if (IconOnly && !string.IsNullOrEmpty(IconName)) was not having an impact as the _text variable was being reset.

This fix allows the ActionLink to display just the Icon
This commit is contained in:
Leigh Pointer 2024-03-13 14:39:04 +01:00
parent bcad5eda81
commit 12e09269d3

View File

@ -100,7 +100,7 @@
_text = Action;
if (!string.IsNullOrEmpty(Text))
{
_text = Text;
_text = Localize(nameof(Text), _text);
}
if (IconOnly && !string.IsNullOrEmpty(IconName))
@ -150,7 +150,6 @@
}
_permissions = (PermissionList == null) ? ModuleState.PermissionList : PermissionList;
_text = Localize(nameof(Text), _text);
_url = EditUrl(_path, _moduleId, Action, _parameters);
if (!string.IsNullOrEmpty(ReturnUrl))