You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -196,7 +227,7 @@ This is a useful method to clean up observers when components are disposed of, i
196
227
{
197
228
if (this.Observer != null)
198
229
{
199
-
await this.Observer.Disconnect();
230
+
await this.Observer.Dispose();
200
231
}
201
232
}
202
233
}
@@ -209,12 +240,14 @@ This is a useful method to clean up observers when components are disposed of, i
209
240
210
241
Rather than directly interfacing with the service, you can use this convenience component for quick and easy observing. You can access the observer entry through the implicit `@context`!
211
242
243
+
You need to make sure to provide the reference of the element you want to observe, this is done by passing the element reference to the context reference.
@@ -250,9 +288,6 @@ public class IntersectionObserverEntry
250
288
}
251
289
```
252
290
253
-
## Implementation Detail
254
-
To avoid creating an unnecessary number of observers for every element being observed, if a `Blazor Observer` shares exactly the same options as another, they will both use the same `IntersectionObserver` instance in JS. As each `Blazor Observer` has a unique id and callback, the elements that are being observed will still be passed to their respective `Blazor Observer`.
255
-
256
291
## Feature Requests
257
292
There's so much that `IntersectionObserver` can do, so if you have any requests or you want better documentation and examples, feel free to make a pull request or create an issue!
0 commit comments