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

fix(data-grid): fix the data provider documentation #882

Merged
merged 2 commits into from
Jun 7, 2021
Merged
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
4 changes: 2 additions & 2 deletions components/data-grid/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ There are 2 ways to supply data to grid, via the following grid component proper
- simplest
- all data upfront
- suitable for small to medium amounts of data (in terms of memory occupation)
- `dataProvider: (params: { page: number, pageSize: number }, callback: (pageItems: unknown[], totalItems?: number) => void) => void`
- `dataProvider: (params: { page: number, pageSize: number }, callback: (pageItems: unknown[], totalItems: number) => void) => void`
- stream of chunks, on demand
- should be used when memory usage concern present (from the data perspective)
- should be used when pulling data from the backend on the fly
Expand Down Expand Up @@ -326,4 +326,4 @@ const cellRenderer = (container, column, data) {
```

Pay attention, how the columns data structure is not maintained in JS anymore.
Moreover, attributes like `sortable`, `auto-width` etc can be binded to some data structure managed be data-binding framework, thus removing the whole customization part out of scripting scope.
Moreover, attributes like `sortable`, `auto-width` etc can be bound to some data structure managed by data-binding framework, thus removing the whole customization part out of the scripting scope.