Giter Site home page Giter Site logo

samprof / blazorvirtualscrolling Goto Github PK

View Code? Open in Web Editor NEW
57.0 5.0 15.0 3.49 MB

Blazor components for efficiently rendering large lists and data using virtual scrolling

Home Page: https://samprof.github.io/BlazorVirtualScrolling/

License: MIT License

HTML 45.77% C# 40.89% JavaScript 9.26% CSS 4.08%
blazor blazor-client blazor-server blazor-component virtualscroll

blazorvirtualscrolling's Introduction

BlazorVirtualScrolling

Material Design components for Blazor and Razor Components

NuGet Gitter GitHub Stars GitHub Issues Live Demo MIT Donate

The VirtualScroll displays large lists of elements performantly by only rendering the items that fit on-screen. Loading hundreds of elements can be slow in any browser; virtual scrolling enables a performant way to simulate all items being rendered by making the height of the container element the same as the height of total number of elements to be rendered, and then only rendering the items in view.

Demo and Documentation

Prerequisites

Don't know what Blazor is? Read here

Complete all Blazor dependencies.

  • .NET Core 3.0 Preview 4 SDK (3.0.0-preview4-19216-03)
  • Visual Studio 2019 Preview 4 with the ASP.NET and web development workload selected.
  • The latest Blazor extension from the Visual Studio Marketplace.
  • The Blazor templates on the command-line: dotnet new -i Microsoft.AspNetCore.Blazor.Templates::3.0.0-preview4-19216-03

Installation

Latest version in here: NuGet

To Install

Install-Package BlazorVirtualScrolling

or

dotnet add package BlazorVirtualScrolling

Usage

@using BlazorVirtualScrolling

<VirtualScroll style="height: 500px;" ItemType="string" Items="@items" ItemHeight="50">
    <div>@context</div>
</VirtualScroll>

@functions
{
    public IEnumerable<string> items = Enumerable.Range(0, 1000000).Select(i => i.ToString()).ToArray();
}

BlazorVirtualScrolling components for server-side Blazor (Razor Components)

  • Startup.cs
app.UseEmbeddedBlazorContent(typeof(BlazorVirtualScrolling.VirtualScroll).Assembly);
  • _Host.cshtml (head section)
@using EmbeddedBlazorContent
<head>
    ...
    @Html.EmbeddedBlazorContent()
</head>

Questions

For how-to questions and other non-issues, for now you can use issues or you can use Gitter.

Contributing

We'd greatly appreciate any contribution you make. :)

License

This project is licensed under the terms of the MIT license.

News

Version 1.0.0

  • First version of VirtualScroll component, proof of concept

blazorvirtualscrolling's People

Contributors

samprof avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

blazorvirtualscrolling's Issues

Non-Uniform Content Height?

This is great.

Just wondering if you've given any thought to how (or whether) it might be possible to support non-uniform content height?

Assembly Reference Issue

Currently getting the following assembly reference issues(have installed all the needed dependencies and updated Visual Studio):

Error CS0246 The type or namespace name 'BaseVirtualScroll<>' could not be found (are you missing a using directive or
Error CS0115 'VirtualScroll.BuildRenderTree(RenderTreeBuilder)': no suitable method found to override

Any suggestions on what I am missing?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.