-
Notifications
You must be signed in to change notification settings - Fork 6
Remote filtering initial sample #879
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
base: vnext
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you really need this file?
| import { IgrColumn, IgrFilteringExpressionsTree, IgrFilteringStrategy } from "igniteui-react-grids"; | ||
|
|
||
| const DATA_URL = 'https://services.odata.org/V4/Northwind/Northwind.svc/Products'; | ||
| const EMPTY_STRING = ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused variables
| const filterExpr = this.buildFilterExpression(filteringArgs); | ||
| if (filterExpr) parts.push(filterExpr); | ||
|
|
||
| return `${baseQuery}&${parts.join('&')}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same problem with URL ending in '&'
… used enums for types
MarielaTihova
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please resolve comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is not needed
| }; | ||
|
|
||
| useEffect(() => { | ||
| fetchData(); // initial load |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we make a new request when we scroll to see the remaining data in the grid instead of fetching everything at once?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we keep the behaviour consistent here? For example look at this sample for Angular here https://www.infragistics.com/angular-demos/grid/grid-sample-4. A new request is being made on every scroll.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose it is the ngAfterViewInit in angular that makes that possible, but you will get empty grid if we remove the initial load. Do you have a suggestion?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📌 Putting a pin on this to discuss more about the behaviour.
|
|
||
| // Initialize the filtering strategy for RemoteService | ||
| useEffect(() => { | ||
| RemoteService._filteringStrategy = new IgrFilteringStrategy(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This produces an error. Sample doesn't run. Please check it
…nd request cancellation
| <!-- NOTE: do not change this file because it's auto re-generated from template: --> | ||
| <!-- https://github.com/IgniteUI/igniteui-react-examples/tree/vnext/templates/sample/ReadMe.md --> | ||
|
|
||
| This folder contains implementation of React application with example of Filtering Options feature using [Grid](https://www.infragistics.com/products/ignite-ui-react/react/components/general-getting-started.html) component. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NOT the "Filtering Options feature"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
| <!-- NOTE: do not change this file because it's auto re-generated from template: --> | ||
| <!-- https://github.com/IgniteUI/igniteui-react-examples/tree/vnext/templates/sample/ReadMe.md --> | ||
|
|
||
| This folder contains implementation of React application with example of Filtering Options feature using [Grid](https://www.infragistics.com/products/ignite-ui-react/react/components/general-getting-started.html) component. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NOT the "Filtering Options feature"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
THIS
| <!-- NOTE: do not change this file because it's auto re-generated from template: --> | ||
| <!-- https://github.com/IgniteUI/igniteui-react-examples/tree/vnext/templates/sample/ReadMe.md --> | ||
|
|
||
| This folder contains implementation of React application with example of Filtering Options feature using [Grid](https://www.infragistics.com/products/ignite-ui-react/react/components/general-getting-started.html) component. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NOT the "Filtering Options feature"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reminding you of this extra file here @tishko0
| }; | ||
|
|
||
| useEffect(() => { | ||
| fetchData(); // initial load |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we keep the behaviour consistent here? For example look at this sample for Angular here https://www.infragistics.com/angular-demos/grid/grid-sample-4. A new request is being made on every scroll.
| }; | ||
|
|
||
| useEffect(() => { | ||
| fetchData(); // initial load |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📌 Putting a pin on this to discuss more about the behaviour.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this archived file should be here.
| <!-- NOTE: do not change this file because it's auto re-generated from template: --> | ||
| <!-- https://github.com/IgniteUI/igniteui-react-examples/tree/vnext/templates/sample/ReadMe.md --> | ||
|
|
||
| This folder contains implementation of React application with example of Filtering Options feature using [Grid](https://www.infragistics.com/products/ignite-ui-react/react/components/general-getting-started.html) component. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
THIS
No description provided.