Havit.Blazor icon indicating copy to clipboard operation
Havit.Blazor copied to clipboard

[HxInputTags] Support for a custom RenderFragment for a tag

Open max-ieremenko opened this issue 2 years ago • 2 comments

It would be nice to support in HxInputTags a callback for customized tag representation.

For example, in the control when a user enters a tag

  • like "see # 123" i want to show in control a link to the issue 123 - "see #123"
  • like "commit 58ddcc" - "commit 58ddcc"
  • etc

max-ieremenko avatar Apr 09 '23 10:04 max-ieremenko

Do you want the tag (badge) content to be customizable or the whole tag representation? The first is quite easy to implement, but more restrictive. The second requires TagTemplateContext.RemoveTagAsync() to be exposed for implementing the Remove button on the tag (badge).

(This feature request is currently not on top of the list of our priorities and will be probably parked in backlog. If you feel urge for such feature, feel free to submit a pull-request. Your sponsorship might help prioritize such feature as well.)

hakenr avatar Apr 18 '23 21:04 hakenr

hi @hakenr,

only customization for tag badgehttps://github.com/havit/Havit.Blazor/blob/96f345b5915175946f3a8e89e86367d428ec6467/Havit.Blazor.Components.Web.Bootstrap/Tags/Internal/HxInputTagsInternal.razor#L26

something like

[Parameter]
public RenderFragment<string>? TagBadgeTemplate { get; set; }

max-ieremenko avatar Apr 21 '23 05:04 max-ieremenko