Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes from igniteui-xplat-examples-output+PRs_2024.11.18.2 #675

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 11 additions & 25 deletions samples/grids/grid/cascading-combo/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { IgrGridModule } from 'igniteui-react-grids';
import { IgrComboModule } from 'igniteui-react';
import { IgrGrid, IgrColumn } from 'igniteui-react-grids';
import { WorldCitiesAbove500KItem, WorldCitiesAbove500K } from './WorldCitiesAbove500K';
import { IgrCombo } from 'igniteui-react';
import { IgrCombo, IgrVoidEventArgs } from 'igniteui-react';
import { IgrCellTemplateContext } from 'igniteui-react-grids';

import 'igniteui-react-grids/grids/combined';
Expand All @@ -27,26 +27,6 @@ export default class Sample extends React.Component<any, any> {
private column1: IgrColumn
private column2: IgrColumn
private column3: IgrColumn
public gridData = [
{
ID: 1,
Country: '',
Region: '',
City: ''
},
{
ID: 2,
Country: '',
Region: '',
City: ''
},
{
ID: 3,
Country: '',
Region: '',
City: ''
}
];

constructor(props: any) {
super(props);
Expand All @@ -62,7 +42,7 @@ export default class Sample extends React.Component<any, any> {
<div className="container fill">
<IgrGrid
autoGenerate="false"
data={this.gridData}
data={this.worldCitiesAbove500K}
primaryKey="ID"
ref={this.gridRef}
rendered={this.webGridWithComboRendered}>
Expand Down Expand Up @@ -105,9 +85,11 @@ export default class Sample extends React.Component<any, any> {
}


public webGridWithComboRendered(args: any) {
console.log(args);
}
public gridData = [
{ ID: 1, Country: '', Region: '', City: '' },
{ ID: 2, Country: '', Region: '', City: '' },
{ ID: 3, Country: '', Region: '', City: '' }
];
public countryNames = [
'United States',
'Japan',
Expand All @@ -123,6 +105,10 @@ export default class Sample extends React.Component<any, any> {
}
}

public webGridWithComboRendered(gridRef: IgrGrid, args: IgrVoidEventArgs) {
gridRef.data = this.gridData;
}

public onCountryChange( rowId: string, cmp: any, args:any) {
// find next combo
// args incomplete, so gte value from component on timeout as workaround.
Expand Down
Loading