Skip to content

Commit

Permalink
🆕 feat(Swiper): add Nested parameter (#2334)
Browse files Browse the repository at this point in the history
  • Loading branch information
capdiem committed Feb 27, 2025
1 parent 766ba3e commit bb66c07
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Masa.Blazor/Components/Swiper/MSwiper.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ public partial class MSwiper : MasaComponentBase

[Parameter] public EventCallback<int> IndexChanged { get; set; }

[Parameter] [MasaApiParameter(ReleasedOn = "v1.9.0")]
public bool Nested { get; set; }

private DotNetObjectReference<object>? _swiperInteropHandle;
private SwiperJSObjectReferenceProxy? _swiperProxy;
private bool _isJsInteropAndRefReady;
Expand Down Expand Up @@ -137,6 +140,7 @@ await RunTaskInMicrosecondsAsync(async () =>
Loop = Loop,
Parallax = Parallax,
SpaceBetween = SpaceBetween,
Nested = Nested,
Autoplay = _autoplay?.GetOptions(),
Pagination = _pagination?.GetOptions($"{rootSelector} .swiper-pagination"),
Navigation = _navigation?.GetOptions($"{rootSelector} .swiper-button-next", $"{rootSelector} .swiper-button-prev")
Expand Down
2 changes: 2 additions & 0 deletions src/Masa.Blazor/Components/Swiper/SwiperOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ public class SwiperOptions

public int SpaceBetween { get; set; }

public bool Nested { get; set; }

[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public SwiperAutoplayOptions? Autoplay { get; set; }

Expand Down

0 comments on commit bb66c07

Please sign in to comment.