I have the following TreeList definition inside a model-dialog box. The modal-dialog:overflow-y options (auto, hidden, scroll, visible) let me turn the dialog's scroll bar on and off. However, none of them seem to work like I would expect. How do I freeze the height of the modal-dialog so that the scroll bar on the TreeList becomes active? It seems the dialog stretches off-screen.
@if (ShowDialog)
{
<div class="modal fade show d-block" id="exampleModal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="titleLabel">@Title</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close" @onclick="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<TelerikTreeList Data="@Groups"
IdField="@nameof(SelectedGroup.Id)"
ParentIdField="@nameof(SelectedGroup.ParentId)"
SelectedItems="@SelectedGroups"
FilterMode="@TreeListFilterMode.None">
<TreeListColumns>
<TreeListColumn Expandable="true" Field="Name" Title="Name" />
</TreeListColumns>
</TelerikTreeList>
</div>
</div>
</div>
</div>
}
<style>
.modal-dialog, .modal-dialog img { /*same value to avoid overwidth*/
width: 70%;
height: 90%;
margin: 15px auto;
overflow-y: visible;
}
</style>