Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@
<p>@((MarkupString)Localizer["IntersectionObserverThresholdDesc"].Value)</p>
<div class="text-center">@_thresholdValueString</div>
</section>
<IntersectionObserver OnIntersecting="OnThresholdChanged" Threshold="0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1" AutoUnobserveWhenIntersection="false">
<IntersectionObserver OnIntersecting="OnThresholdChanged" Threshold="0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1"
AutoUnobserveWhenIntersection="false">
<div class="bb-list-load scroll" style="height: 200px;">
<div class="d-flex" style="height: 600px; justify-content: center; align-items: center;">
<IntersectionObserverItem>
Expand All @@ -118,8 +119,7 @@
</div>
}
</div>
<LoadMore OnLoadMoreAsync="OnLoadMoreItemAsync" CanLoading="_canLoading">
</LoadMore>
<LoadMore OnLoadMoreAsync="OnLoadMoreItemAsync" CanLoading="_canLoading"></LoadMore>
</div>
</DemoBlock>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ namespace BootstrapBlazor.Components;
public partial class IntersectionObserver
{
/// <summary>
/// 获得/设置 是否使用元素视口作为根元素 默认为 false 使用浏览器视口作为根元素
/// <para>The element that is used as the viewport for checking visibility of the target. Must be the ancestor of the target. Defaults to the browser viewport if value is false. Default value is false</para>
/// 获得/设置 是否使用元素视口作为根元素 默认为 true 使用当前元素作为根元素
/// <para>The element that is used as the viewport for checking visibility of the target. Must be the ancestor of the target. Defaults to the browser viewport if value is false. Default value is true</para>
/// </summary>
[Parameter]
public bool UseElementViewport { get; set; }
public bool UseElementViewport { get; set; } = true;

/// <summary>
/// Margin around the root. Can have values similar to the CSS margin property, e.g. "10px 20px 30px 40px" (top, right, bottom, left). The values can be percentages. This set of values serves to grow or shrink each side of the root element's bounding box before computing intersections. Defaults to all zeros.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
@namespace BootstrapBlazor.Components
@inherits BootstrapModuleComponentBase

<IntersectionObserver OnIntersecting="OnIntersecting" Threshold="@Threshold" AutoUnobserveWhenIntersection="false">
<IntersectionObserver OnIntersecting="OnIntersecting" Threshold="@Threshold" AutoUnobserveWhenIntersection="false"
UseElementViewport="false">
<IntersectionObserverItem>
<div class="bb-intersection-loading">
@if (CanLoading)
Expand Down
Loading