New Demo Example for using X.PagedList with Ivy Framework#212
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds a new demonstration example showing how to integrate X.PagedList with the Ivy Framework for creating paginated interfaces. The example demonstrates real pagination with navigation controls and metadata display.
- Implements X.PagedList integration with Ivy's state management system
- Demonstrates pagination UI with prev/next navigation and disabled states
- Shows paging metadata display including page numbers, total counts, and item ranges
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| XPagedListExample.csproj | Project configuration with Ivy and X.PagedList package references |
| README.md | Documentation with run and deploy instructions for the demo |
| Program.cs | Ivy server bootstrap configuration with hot reload and Chrome settings |
| GlobalUsings.cs | Global using statements for Ivy namespaces and X.PagedList |
| XpagedList.cs | Main demo app implementing pagination logic and UI components |
| .gitignore | Standard ignore patterns for build artifacts and IDE files |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new Ivy example XpagedList showcasing how to create paged lists using the X.PagedList NuGet package inside an Ivy app.
Implements: #192
What’s included
XPagedListExample/XPagedListExample.csproj— project with references to Ivy and X.PagedListXPagedListExample/Program.cs— Ivy server bootstrap (Hot Reload in Debug, default app wired)XPagedListExample/GlobalUsings.cs— common Ivy namespaces for fluent helpers (Layout,Text,Button, etc.)XPagedListExample/Apps/XpagedList.cs— UI + paging logic usingUseState<T>(T?, bool)and X.PagedListXPagedListExample/README.md— quick run instructionsFeatures demonstrated
Item 1..53), page size = 10HasPreviousPage/HasNextPagePageNumber,PageCount,TotalItemCount,FirstItemOnPage,LastItemOnPagenew PagedList<string>(items, pageNumber, pageSize)UseState<T>(T?, bool)to avoid overload ambiguityHow it works
Enumerable.Range(1, 53).Select(i => $"Item {i}")stored withUseState<List<string>>(..., true)pageNumberviaUseState<int>(2, true);pageSizeis a constant10new PagedList<string>(items.Value, pageNumber.Value, pageSize)pageNumberto[1 .. page.PageCount]if data changesText.Label(s)pageNumberand are disabled based onHasPreviousPage/HasNextPage