mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
fix(virtual-scroll): fixes dynamic changes
This commit is contained in:
20
core/src/components.d.ts
vendored
20
core/src/components.d.ts
vendored
@ -5074,7 +5074,7 @@ export namespace Components {
|
||||
|
||||
interface IonVirtualScroll {
|
||||
/**
|
||||
* The approximate width of each footer template's cell. This dimension is used to help determine how many cells should be created when initialized, and to help calculate the height of the scrollable area. This value can use either `px` or `%` units. Note that the actual rendered size of each cell comes from the app's CSS, whereas this approximation is used to help calculate initial dimensions before the item has been rendered.
|
||||
* The approximate width of each footer template's cell. This dimension is used to help determine how many cells should be created when initialized, and to help calculate the height of the scrollable area. This height value can only use `px` units. Note that the actual rendered size of each cell comes from the app's CSS, whereas this approximation is used to help calculate initial dimensions before the item has been rendered.
|
||||
*/
|
||||
'approxFooterHeight': number;
|
||||
/**
|
||||
@ -5085,6 +5085,14 @@ export namespace Components {
|
||||
* It is important to provide this if virtual item height will be significantly larger than the default The approximate height of each virtual item template's cell. This dimension is used to help determine how many cells should be created when initialized, and to help calculate the height of the scrollable area. This height value can only use `px` units. Note that the actual rendered size of each cell comes from the app's CSS, whereas this approximation is used to help calculate initial dimensions before the item has been rendered.
|
||||
*/
|
||||
'approxItemHeight': number;
|
||||
/**
|
||||
* This method marks the tail the items array as dirty, so they can be re-rendered. It's equivalent to calling: ```js * virtualScroll.checkRange(lastItemLen); * ```
|
||||
*/
|
||||
'checkEnd': () => void;
|
||||
/**
|
||||
* This method marks a subset of items as dirty, so they can be re-rendered. Items should be marked as dirty any time the content or their style changes. The subset of items to be updated can are specifing by an offset and a length.
|
||||
*/
|
||||
'checkRange': (offset: number, len?: number) => void;
|
||||
'domRender'?: DomRenderFn;
|
||||
/**
|
||||
* Section footers and the data used within its given template can be dynamically created by passing a function to `footerFn`. The logic within the footer function can decide if the footer template should be used, and what data to give to the footer template. The function must return `null` if a footer cell shouldn't be created.
|
||||
@ -5103,14 +5111,6 @@ export namespace Components {
|
||||
*/
|
||||
'items'?: any[];
|
||||
/**
|
||||
* This method marks a subset of items as dirty, so they can be re-rendered. Items should be marked as dirty any time the content or their style changes. The subset of items to be updated can are specifing by an offset and a length.
|
||||
*/
|
||||
'markDirty': (offset: number, len?: number) => void;
|
||||
/**
|
||||
* This method marks the tail the items array as dirty, so they can be re-rendered. It's equivalent to calling: ``` * virtualScroll.markDirty(lastItemLen, items.length - lastItemLen); * ```
|
||||
*/
|
||||
'markDirtyTail': () => void;
|
||||
/**
|
||||
* NOTE: only Vanilla JS API.
|
||||
*/
|
||||
'nodeRender'?: ItemRenderFn;
|
||||
@ -5133,7 +5133,7 @@ export namespace Components {
|
||||
}
|
||||
interface IonVirtualScrollAttributes extends StencilHTMLAttributes {
|
||||
/**
|
||||
* The approximate width of each footer template's cell. This dimension is used to help determine how many cells should be created when initialized, and to help calculate the height of the scrollable area. This value can use either `px` or `%` units. Note that the actual rendered size of each cell comes from the app's CSS, whereas this approximation is used to help calculate initial dimensions before the item has been rendered.
|
||||
* The approximate width of each footer template's cell. This dimension is used to help determine how many cells should be created when initialized, and to help calculate the height of the scrollable area. This height value can only use `px` units. Note that the actual rendered size of each cell comes from the app's CSS, whereas this approximation is used to help calculate initial dimensions before the item has been rendered.
|
||||
*/
|
||||
'approxFooterHeight'?: number;
|
||||
/**
|
||||
|
Reference in New Issue
Block a user