ui-material-components icon indicating copy to clipboard operation
ui-material-components copied to clipboard

Tabs component crashes when trying to swipe - iOS

Open 13dante04 opened this issue 4 years ago • 2 comments

Nativescript Angular

devDependencies:


    "devDependencies": {
        "@angular/cli": "~10.1.3",
        "@angular/compiler-cli": "~10.1.3",
        "@nativescript/android": "7.0.1",
        "@nativescript/ios": "7.2.0",
        "@nativescript/types": "~7.0.4",
        "@nativescript/webpack": "~4.0.0",
        "@ngtools/webpack": "10.1.3"
    },

The issue occurs on iPhone, OS version 14.3, not sure about other versions. The tabs component loads, but doesn't show any content that is inside the <TabContentItem> tag. Upon touching the screen, or trying the swipe, the app crashes with the following error:

***** Fatal JavaScript exception - application has been terminated. *****
NativeScript encountered a fatal error: Uncaught TypeError: Cannot read property 'length' of undefined
at
module.exports.push.../../packages/tabs/tabs.js.UIPageViewControllerDataSourceImpl.pageViewControllerViewControllerAfterViewController(file: src/Users/******/ui-material-components/packages/tabs/tabs.js:257:0)
*** Terminating app due to uncaught exception 'NativeScript encountered a fatal error: Uncaught TypeError: Cannot read property 'length' of undefined
at
module.exports.push.../../packages/tabs/tabs.js.UIPageViewControllerDataSourceImpl.pageViewControllerViewControllerAfterViewController(file: src/Users/*******/ui-material-components/packages/tabs/tabs.js:257:0)
', reason: '(null)'

I have tried this on my app and on the angular demo that is in this repository, the same issue occurs

so the error occurs in the pageViewControllerViewControllerAfterViewController method.

when trying to get the length of owner.items which is undefined. I also tried binding to the [items] property on the MDTabs item, removing the selectedIndex and playing around wiht other properties but it doesn't fix the issue.

13dante04 avatar Feb 18 '21 11:02 13dante04

We're having the same issue here, and it looks like we have to use this plugin to do tabs now, since the core component no longer works, which has us kinda stuck out of nowhere, really bad timing too

AnthonyLenglet avatar Feb 18 '21 13:02 AnthonyLenglet

Looking into the android version, I just get a blank screen when I use the component tried looking into it but I can't figure out where it actually starts, console logs are not giving anything

AnthonyLenglet avatar Feb 18 '21 15:02 AnthonyLenglet