File tree Expand file tree Collapse file tree 3 files changed +21
-1
lines changed
documentation/docs/tutorial/03-Customization Expand file tree Collapse file tree 3 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -151,6 +151,20 @@ export default {
151
151
}
152
152
]
153
153
```
154
+ Additionally, you can configure ` options.listBufferSize ` to specify the number of rows to buffer for virtual scrolling. The default value is 30 rows.
155
+
156
+ ``` typescript title="./resources/apartments.ts"
157
+ export default {
158
+ resourceId: ' aparts' ,
159
+ options: {
160
+ ...
161
+ listVirtualScrollEnabled : true ,
162
+ // diff-add
163
+ listBufferSize: 20 ,
164
+ }
165
+ }
166
+ ]
167
+ ```
154
168
155
169
### Custom row click action
156
170
Original file line number Diff line number Diff line change 123
123
:tableBodyStartInjection =" coreStore.resourceOptions?.pageInjections?.list?.tableBodyStart"
124
124
:container-height =" 1100"
125
125
:item-height =" 52.5"
126
- :buffer-size =" 30 "
126
+ :buffer-size =" listBufferSize "
127
127
/>
128
128
<ResourceListTable
129
129
v-else
@@ -202,6 +202,7 @@ const DEFAULT_PAGE_SIZE = 10;
202
202
203
203
const pageSize = computed (() => coreStore .resource ?.options ?.listPageSize || DEFAULT_PAGE_SIZE );
204
204
const isVirtualScrollEnabled = computed (() => coreStore .resource ?.options ?.listVirtualScrollEnabled || false );
205
+ const listBufferSize = computed (() => coreStore .resource ?.options ?.listBufferSize || 30 );
205
206
206
207
const isPageLoaded = ref (false );
207
208
Original file line number Diff line number Diff line change @@ -399,6 +399,11 @@ export interface AdminForthResourceInputCommon {
399
399
*/
400
400
listVirtualScrollEnabled ?: boolean ,
401
401
402
+ /**
403
+ * Buffer size for virtual scroll in list view.
404
+ */
405
+ listBufferSize ?: number ,
406
+
402
407
/**
403
408
* Callback to define what happens when user clicks on record in list view.
404
409
* By default show view will be opened.
You can’t perform that action at this time.
0 commit comments