Skip to content

Commit d4b4f56

Browse files
committed
Merge branch 'rel-2.0'
2 parents c50dae7 + cf92026 commit d4b4f56

3 files changed

Lines changed: 8 additions & 7 deletions

File tree

Source/Blazorise.FluentUI2/Components/Slider.razor.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#region Using directives
22
using System.Threading.Tasks;
3+
using Blazorise.Extensions;
34
using Blazorise.Utilities;
45
#endregion
56

@@ -74,7 +75,7 @@ private void BuildInputStyles( StyleBuilder builder )
7475
TValue max = Converters.ChangeType<TValue>( Max );
7576

7677
var currentValue = MathUtils.Clamp( CurrentValue, min, max );
77-
var valuePercent = MathUtils.GetPercent( currentValue, min, max );
78+
var valuePercent = MathUtils.GetPercent( currentValue, min, max ).ToCultureInvariantString();
7879

7980
builder.Append( $"--fui-Slider--direction: 90deg;--fui-Slider--progress: {valuePercent}%;" );
8081

Source/Blazorise/Components/Select/SelectItem.razor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public bool CompareTo( object value )
5252
/// <summary>
5353
/// Convert the value to string because option tags are working with string internally. Otherwise some datatypes like booleans will not work as expected.
5454
/// </summary>
55-
protected string StringValue => Value?.ToString();
55+
protected string StringValue => Value?.ToString() ?? string.Empty;
5656

5757
/// <summary>
5858
/// Gets or sets the item value.

Source/Extensions/Blazorise.Charts/wwwroot/patches/chartResponsiveResizePatch.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ export function scheduleResponsiveResizePatch(instance, resetSize) {
3838
return;
3939
}
4040

41-
const schedule = typeof requestAnimationFrame === "function"
42-
? requestAnimationFrame
41+
const schedule = typeof window !== "undefined" && typeof window.requestAnimationFrame === "function"
42+
? (callback) => window.requestAnimationFrame(callback)
4343
: (callback) => setTimeout(callback, 16);
4444

45-
const cancel = typeof cancelAnimationFrame === "function"
46-
? cancelAnimationFrame
47-
: clearTimeout;
45+
const cancel = typeof window !== "undefined" && typeof window.cancelAnimationFrame === "function"
46+
? (requestId) => window.cancelAnimationFrame(requestId)
47+
: (requestId) => clearTimeout(requestId);
4848

4949
instance.cancelResizeRequest = cancel;
5050
instance.resizeRequestId = schedule(() => {

0 commit comments

Comments
 (0)