Migrate Grid Lite samples to v0.4.0 declarative column API with function components#1028
Draft
Migrate Grid Lite samples to v0.4.0 declarative column API with function components#1028
Conversation
Co-authored-by: damyanpetev <3198469+damyanpetev@users.noreply.github.com>
Co-authored-by: damyanpetev <3198469+damyanpetev@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update Grid Lite samples to use declarative column API
Migrate Grid Lite samples to v0.4.0 declarative column API
Feb 4, 2026
damyanpetev
reviewed
Feb 5, 2026
Member
There was a problem hiding this comment.
@copilot I don't like the use of gridRef to access columns to assign templates. It should work just fine to assign those directly to the column component.
<igc-grid-lite-column field="price" cellTemplate={priceCellTemplate}></igc-grid-lite-column>
Can you update the those to simple functions for all samples. Also while at it, switch the sample components to function-based please.
Contributor
Author
There was a problem hiding this comment.
Done! All 13 samples have been refactored to:
- Function-based components using React hooks (useState, useEffect, useCallback, useMemo)
- cellTemplate functions defined outside component and passed directly as props
- Removed all gridRef.current.columns.find() pattern for setting templates
See commits 5dfbd91, 5358ef6, and 46f2710 for the complete refactoring.
Co-authored-by: damyanpetev <3198469+damyanpetev@users.noreply.github.com>
…d fix useMemo dependencies Co-authored-by: damyanpetev <3198469+damyanpetev@users.noreply.github.com>
Co-authored-by: damyanpetev <3198469+damyanpetev@users.noreply.github.com>
Copilot
AI
changed the title
Migrate Grid Lite samples to v0.4.0 declarative column API
Migrate Grid Lite samples to v0.4.0 declarative column API with function components
Feb 5, 2026
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.
Updates all 13 Grid Lite samples to use the declarative column configuration API introduced in
igniteui-grid-litev0.4.0. Columns are now defined as JSX elements instead of programmatic arrays, and all samples have been refactored to modern function-based React components.Changes
Package updates
igniteui-grid-liteto~0.4.0in all samplepackage.jsonfilesColumn configuration
<igc-grid-lite-column>JSX elementskey→field,type→dataType,headerText→headersort: true→sortable,filter: true→filterablecellTemplatedirectly as props to column elements (defined as functions outside components)Component architecture
useState,useEffect,useCallback,useMemo,useRefuseEffectreturn functionsGrid-level sorting API
sortConfiguration→sortingOptionssortConfiguration.multiplewithsortingOptions.mode('single' | 'multiple')sortExpressions→sortingExpressionson grid instancestriStatepropertyEvent handlers and expressions
keyproperty inFilterExpressionandSortingExpressionobjects (refers to field name, not column property)Example
Before (class-based with gridRef access):
After (function-based with direct cellTemplate props):
Impact: Net -296 lines across 25 files (1,398 insertions, 1,694 deletions) with improved code quality and maintainability
Original prompt
This pull request was created from Copilot chat.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.