Skip to content

Commit a77773b

Browse files
committed
refactor: 更新使用元素视口逻辑
1 parent a2d6650 commit a77773b

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/BootstrapBlazor/Components/IntersectionObserver/IntersectionObserver.razor.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// See the LICENSE file in the project root for more information.
44
// Maintainer: Argo Zhang([email protected]) Website: https://www.blazor.zone
55

6-
76
namespace BootstrapBlazor.Components;
87

98
/// <summary>
@@ -12,7 +11,7 @@ namespace BootstrapBlazor.Components;
1211
public partial class IntersectionObserver
1312
{
1413
/// <summary>
15-
/// 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 not specified or if null
14+
/// 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
1615
/// </summary>
1716
[Parameter]
1817
public bool UseElementViewport { get; set; }

src/BootstrapBlazor/Components/IntersectionObserver/IntersectionObserver.razor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export function init(id, invoke, options) {
88

99
const items = [...el.querySelectorAll(".bb-intersection-observer-item")];
1010

11-
if (options.useElementViewport === false) {
11+
if (options.useElementViewport === true) {
1212
options.root = el;
1313
}
1414
if (options.threshold && options.threshold.indexOf(' ') > 0) {

0 commit comments

Comments
 (0)