RadzenTree - Template with icon only button

Hi,

i got an issue while using RadzenTree with a template.

Follow these steps:

  1. Got to RadzenTree-Example

  2. Change to "Edit Source"-Tab and replace the whole <RadzenTree> with

<RadzenTree>
        <RadzenTreeItem>
            <Template>
                 <RadzenButton Icon="warning"
                               ButtonStyle="ButtonStyle.Warning"
                               Size="ButtonSize.Medium"
                               Style="margin-right:10px"/>

                 <RadzenText>This is a test</RadzenText>
            </Template>          
        </RadzenTreeItem>
    </RadzenTree>
  1. Click "Run"
  2. The icon of the RadzenButton is not centered

  1. Unchecking the checkbox of the marked css solves the issue

Is there something wrong of using RadzenTree like that?

Thanks in advance.

Best regards.

Don't see anything wrong. Looks like a styling bug that should be fixed in one of the upcoming updates.

Meanwhile, you can use:

<style>
.rz-button .rzi {
    margin: 0 !important;
}
</style>
1 Like

Good afternoon,

is this already fixed or should i open an issue on github for this?

Best regards.

Hi @blazorber,

Thanks for bringing this up. Just fixed it, and will be live with the next version: