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 {
151151 }
152152 ]
153153```
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+ ```
154168
155169### Custom row click action
156170
Original file line number Diff line number Diff line change 123123 :tableBodyStartInjection =" coreStore.resourceOptions?.pageInjections?.list?.tableBodyStart"
124124 :container-height =" 1100"
125125 :item-height =" 52.5"
126- :buffer-size =" 30 "
126+ :buffer-size =" listBufferSize "
127127 />
128128 <ResourceListTable
129129 v-else
@@ -202,6 +202,7 @@ const DEFAULT_PAGE_SIZE = 10;
202202
203203const pageSize = computed (() => coreStore .resource ?.options ?.listPageSize || DEFAULT_PAGE_SIZE );
204204const isVirtualScrollEnabled = computed (() => coreStore .resource ?.options ?.listVirtualScrollEnabled || false );
205+ const listBufferSize = computed (() => coreStore .resource ?.options ?.listBufferSize || 30 );
205206
206207const isPageLoaded = ref (false );
207208
Original file line number Diff line number Diff line change @@ -399,6 +399,11 @@ export interface AdminForthResourceInputCommon {
399399 */
400400 listVirtualScrollEnabled ?: boolean ,
401401
402+ /**
403+ * Buffer size for virtual scroll in list view.
404+ */
405+ listBufferSize ?: number ,
406+
402407 /**
403408 * Callback to define what happens when user clicks on record in list view.
404409 * By default show view will be opened.
You can’t perform that action at this time.
0 commit comments