BlazorIntersectionObserver

🔎 Intersection Observer API wrapper for Blazor applications

MIT License

Stars
61

Bot releases are visible (Hide)

BlazorIntersectionObserver - 3.1.0: Resolving JS asset location for relative paths Latest Release

Published by ljbc1994 about 3 years ago

  • This resolved an issue with Blazor not being able to find the location of the Intersection Observer JS script if the site is hosted on a subpath.

Thanks to:
@epicturkey

BlazorIntersectionObserver - 3.0.1: Helpful error messages for `IntersectionObserve` component

Published by ljbc1994 about 3 years ago

Helpful error messages will now appear if the consumer fails to provide:

  • An element to observe.
  • No element within the component.
BlazorIntersectionObserver - 3.0.0: Namespace update to avoid conflicts with Blazor libraries

Published by ljbc1994 about 3 years ago

  • Namespace has been changed to Ljbc1994.Blazor.IntersectionObserver to avoid namespace conflicts with Blazor libraries.
  • Bump to node packages to avoid security vulnerabilities
BlazorIntersectionObserver - 2.0.3: Include unminified js script

Published by ljbc1994 over 3 years ago

  • This release now outputs both the unminified and minified versions for the js script.
BlazorIntersectionObserver - Missing changes to csproj

Published by ljbc1994 over 3 years ago

  • Added references to the csproj for the new minified js file.
BlazorIntersectionObserver - Improvements to the component and API

Published by ljbc1994 over 3 years ago

  • IntersectionObserve now requires a reference to the node it's observing, means the component only deals with observing and not polluted with Class or Style.

Now the component's context includes a reference which needs to be provided with the element that needs to be observed.

@using Blazor.IntersectionObserver

<IntersectionObserve>
    <div @ref="context.Ref.Current">
        Hey... I'm @(context.IsIntersecting ? "in view": "out of view")
    </div>
</IntersectionObserve>
  • A new dispose method on the service rather than disconnect. Disconnect follows the API and removes any elements that are being observed but does not remove the observer.
  • Remove underlying shared observer, instead each IntersectionObserve instance will have their own observer.
  • Updates to documentation to reflect the above changes.
  • Include a minified script file for js import.
  • Bump outdated npm packages.
BlazorIntersectionObserver - Updated package to remove content files

Published by ljbc1994 almost 4 years ago

  • Removed content files bleeding into the nuget package build.
BlazorIntersectionObserver - Upgraded to dotnet 5

Published by ljbc1994 almost 4 years ago

What's the update?

  • This package now works with dotnet 5 for both webassembly and server.