From 1219bff8f92945bce534508d2ef9e0db18d17121 Mon Sep 17 00:00:00 2001 From: snakex64 Date: Tue, 22 Aug 2023 12:45:36 -0400 Subject: [PATCH 1/2] RangeSlider-Added DisableMin and DisableMax --- .../RangeSlider/MudRangeSlider.razor | 4 +- .../RangeSlider/MudRangeSlider.razor.cs | 40 +++++++++++++------ .../Pages/Examples/RangeSliderExample1.razor | 6 ++- global.json | 5 --- 4 files changed, 35 insertions(+), 20 deletions(-) delete mode 100644 global.json diff --git a/CodeBeam.MudBlazor.Extensions/Components/RangeSlider/MudRangeSlider.razor b/CodeBeam.MudBlazor.Extensions/Components/RangeSlider/MudRangeSlider.razor index 67b3a332..e0c643f3 100644 --- a/CodeBeam.MudBlazor.Extensions/Components/RangeSlider/MudRangeSlider.razor +++ b/CodeBeam.MudBlazor.Extensions/Components/RangeSlider/MudRangeSlider.razor @@ -31,13 +31,13 @@ @if (Range) { - @SliderValueLabel(upperLeft, UpperValue?.ToString()) } - @SliderValueLabel(left, Value?.ToString()) diff --git a/CodeBeam.MudBlazor.Extensions/Components/RangeSlider/MudRangeSlider.razor.cs b/CodeBeam.MudBlazor.Extensions/Components/RangeSlider/MudRangeSlider.razor.cs index 8eea4b4d..73caaedc 100644 --- a/CodeBeam.MudBlazor.Extensions/Components/RangeSlider/MudRangeSlider.razor.cs +++ b/CodeBeam.MudBlazor.Extensions/Components/RangeSlider/MudRangeSlider.razor.cs @@ -91,18 +91,34 @@ public T? Step set => _step = Converter.Set(value); } - /// - /// If true, the slider will be disabled. - /// - /// - [Parameter] - [Category(CategoryTypes.Slider.Behavior)] - public bool Disabled { get; set; } = false; - - /// - /// Child content of component. - /// - [Parameter] + /// + /// If true, the slider will be disabled. + /// + /// + [Parameter] + [Category(CategoryTypes.Slider.Behavior)] + public bool Disabled { get; set; } = false; + + /// + /// If true and , the slider's min value will be disabled. + /// + /// + [Parameter] + [Category(CategoryTypes.Slider.Behavior)] + public bool DisableMin { get; set; } = false; + + /// + /// If true and , the slider's max value will be disabled. + /// + /// + [Parameter] + [Category(CategoryTypes.Slider.Behavior)] + public bool DisableMax { get; set; } = false; + + /// + /// Child content of component. + /// + [Parameter] [Category(CategoryTypes.Slider.Behavior)] public RenderFragment? ChildContent { get; set; } diff --git a/ComponentViewer.Docs/Pages/Examples/RangeSliderExample1.razor b/ComponentViewer.Docs/Pages/Examples/RangeSliderExample1.razor index 267c9df5..abaa3cd3 100644 --- a/ComponentViewer.Docs/Pages/Examples/RangeSliderExample1.razor +++ b/ComponentViewer.Docs/Pages/Examples/RangeSliderExample1.razor @@ -5,7 +5,7 @@ @_label + Min="_min" Max="_max" Step="_step" Display="_display" MinDistance="_minDistance" DisableMin="_disableMin" DisableMax="_disableMax">@_label @@ -16,6 +16,8 @@ + + @@ -34,6 +36,8 @@ bool _display = true; bool _range = true; bool _tickmarks = false; + bool _disableMin = false; + bool _disableMax = false; int _min = 0; int _max = 100; int _step = 1; diff --git a/global.json b/global.json deleted file mode 100644 index 0f11ff6e..00000000 --- a/global.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "sdk": { - "version": "7.0.203" - } -} \ No newline at end of file From aa78a24aef86b911f148287181b13c80dcc53505 Mon Sep 17 00:00:00 2001 From: snakex64 <39806655+snakex64@users.noreply.github.com> Date: Tue, 22 Aug 2023 13:38:58 -0400 Subject: [PATCH 2/2] Create global.json --- global.json | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 global.json diff --git a/global.json b/global.json new file mode 100644 index 00000000..ad7cdc70 --- /dev/null +++ b/global.json @@ -0,0 +1,5 @@ +{ + "sdk": { + "version": "7.0.203" + } +}