diff --git a/package.json b/package.json index 45602682..ddfffbf5 100644 --- a/package.json +++ b/package.json @@ -43,13 +43,13 @@ "react-native": ">= 0.30.0" }, "devDependencies": { - "@types/lodash.debounce": "4.0.3", + "@types/lodash.debounce": "4.0.8", "@types/prop-types": "15.5.2", - "@types/react-native": "0.49.5", "@types/react": "16.4.7", - "@types/resize-observer-browser": "^0.1.7", + "@types/react-native": "0.49.5", + "@types/resize-observer-browser": "0.1.7", "file-directives": "1.4.6", "tslint": "5.11.0", - "typescript": "3.3.1" + "typescript": "4.9.5" } } diff --git a/src/core/RecyclerListView.tsx b/src/core/RecyclerListView.tsx index 95dd87be..d12edc14 100644 --- a/src/core/RecyclerListView.tsx +++ b/src/core/RecyclerListView.tsx @@ -589,7 +589,13 @@ export default class RecyclerListView
extends React. return true; } + /** + * allow the extended component to access _hasRenderedOnce flag + * to ensure that the component has rendered at least once + * @returns _hasRenderedOnce + */ + public getHasRenderedOnce(): boolean { + return this._hasRenderedOnce; + } //setState inside will not update the existing cycle, not a true replacement for componentWillReceiveProps public componentWillReceivePropsCompat(newProps: T1): void { //no op