From d08be4103e4b1a088b53ac306c16a46c7ffa5d96 Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Tue, 21 Jan 2025 13:32:06 +0100 Subject: [PATCH] Allow additional styles & fixes missed min. width --- app/MindWork AI Studio/Components/InnerScrolling.razor | 2 +- .../Components/InnerScrolling.razor.cs | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app/MindWork AI Studio/Components/InnerScrolling.razor b/app/MindWork AI Studio/Components/InnerScrolling.razor index 7b506722..6905bf2d 100644 --- a/app/MindWork AI Studio/Components/InnerScrolling.razor +++ b/app/MindWork AI Studio/Components/InnerScrolling.razor @@ -1,6 +1,6 @@ @inherits MSGComponentBase -
+
@if (this.HeaderContent is not null) {
diff --git a/app/MindWork AI Studio/Components/InnerScrolling.razor.cs b/app/MindWork AI Studio/Components/InnerScrolling.razor.cs index e9ce0c76..3b483c4a 100644 --- a/app/MindWork AI Studio/Components/InnerScrolling.razor.cs +++ b/app/MindWork AI Studio/Components/InnerScrolling.razor.cs @@ -26,6 +26,9 @@ public partial class InnerScrolling : MSGComponentBase [Parameter] public string? MinWidth { get; set; } + + [Parameter] + public string Style { get; set; } = string.Empty; [CascadingParameter] private MainLayout MainLayout { get; set; } = null!; @@ -66,10 +69,14 @@ public partial class InnerScrolling : MSGComponentBase #endregion - private string MinWidthStyle => string.IsNullOrWhiteSpace(this.MinWidth) ? string.Empty : $"min-width: {this.MinWidth};"; + private string MinWidthStyle => string.IsNullOrWhiteSpace(this.MinWidth) ? string.Empty : $"min-width: {this.MinWidth}; "; + + private string TerminatedStyles => string.IsNullOrWhiteSpace(this.Style) ? string.Empty : $"{this.Style}; "; private string Classes => this.FillEntireHorizontalSpace ? $"{this.Class} d-flex flex-column flex-grow-1" : $"{this.Class} d-flex flex-column"; + private string Styles => $"flex-grow: 1; overflow: hidden; {this.TerminatedStyles}{this.MinWidthStyle}"; + public async Task ScrollToBottom() { await this.AnchorAfterChildContent.ScrollIntoViewAsync(this.JsRuntime);