ProgressNS / nativescript-ui-feedback

This repository is used for customer feedback regarding Telerik UI for NativeScript. The issues system here is used by customers who want to submit their feature requests or vote for existing ones.
Other
115 stars 21 forks source link

Broken on NS7 & Angular 10 & IOS with 14.2 devices #1487

Open aaltotsky opened 3 years ago

aaltotsky commented 3 years ago

Code is working perfectly fine on IOS devices 14.1. People who upgrade to 14.2 are experiencing app crash with error

NativeScript encountered a fatal error: Uncaught TypeError: Cannot read property 'itemView' of undefined at push... /node_modules/nativescript-ui-autocomplete/ui-autocomplete.js.SuggestionViewCell.layoutSubviews( file: node_modules/nativescript-ui-autocomplete/ui-autocomplete.ios.js:59:0)

Here is my layout:

            <RadAutoCompleteTextView #autocompleteBrandsRef suggestMode="Suggest" displayMode="Plain" completionMode="Contains" layoutMode="Horizontal" (textChanged)="brandNameChanged($event)">
                <SuggestionView tkAutoCompleteSuggestionView suggestionViewHeight="150">
                    <ng-template tkSuggestionItemTemplate let-item="item">
                        <StackLayout orientation="vertical" padding="10">
                            <Label [text]="item.text"></Label>
                        </StackLayout>
                    </ng-template>
                </SuggestionView>
            </RadAutoCompleteTextView>

Please, provide the details below:

Tell us about the problem

The error occurred in this code: this.view.itemView

SuggestionViewCell.prototype.layoutSubviews = function () {
        _super.prototype.layoutSubviews.call(this);
        var itemViewDimensions = this.measureCell(this.view.itemView);
        var cellView = this.view.itemView;
        View.layoutChild(this.owner, cellView, 0, 0, itemViewDimensions.measuredWidth, itemViewDimensions.measuredHeight);
        var measuredHeight = Utils.layout.round(Utils.layout.toDeviceIndependentPixels(itemViewDimensions.measuredHeight));
        this.owner.suggestionView.ios.cellHeight = measuredHeight;
    };

Which platform(s) does your issue occur on?

I ran on MacOS Catalina 10.15.7 and Xcode 12.2 beta (https://developer.apple.com/support/xcode/)

My package.json

"dependencies": { "@angular-devkit/schematics": "^10.2.0", "@angular/animations": "10.2.1", "@angular/common": "10.2.0", "@angular/compiler": "10.2.1", "@angular/core": "10.2.0", "@angular/forms": "10.2.1", "@angular/http": "~8.0.0-beta.10", "@angular/platform-browser": "10.2.0", "@angular/platform-browser-dynamic": "10.2.0", "@angular/router": "10.2.0", "@nativescript/schematics": "10.1.0", "@nativescript/angular": "10.0.0", "@nativescript/core": "~7.0.0", "nativescript-theme-core": "2.0.24", "nativescript-ui-autocomplete": "7.0.2", "nativescript-ui-sidedrawer": "9.0.2", "reflect-metadata": "~0.1.13", "rxjs": "~6.5.0", "zone.js": "~0.9.1" }, "devDependencies": { "@angular/compiler-cli": "10.2.1", "@nativescript/android": "7.0.1", "@nativescript/ios": "7.0.4", "@nativescript/webpack": "~3.0.8", "@ngtools/webpack": "~10.2.0", "node-sass": "4.12.0", "typescript": "3.9.7" },

Runtime: IOS CLI: latest

aaltotsky commented 3 years ago

I updated package.json components to the latest, but I still have the same error.

 "dependencies": {
    "@angular-devkit/schematics": "^10.2.0",
    "@angular/animations": "10.2.3",
    "@angular/common": "10.2.3",
    "@angular/compiler": "10.2.3",
    "@angular/core": "10.2.3",
    "@angular/forms": "10.2.3",
    "@angular/http": "~8.0.0-beta.10",
    "@angular/platform-browser": "10.2.3",
    "@angular/platform-browser-dynamic": "10.2.3",
    "@angular/router": "10.2.3",
    "@nativescript/schematics": "10.1.0",
    "@nativescript/angular": "10.1.7",
    "@nativescript/core": "~7.0.13",
    "nativescript-theme-core": "2.0.24",
    "nativescript-ui-autocomplete": "7.0.2",
    "nativescript-ui-sidedrawer": "9.0.3",
    "reflect-metadata": "~0.1.13",
    "rxjs": "~6.6.3",
    "zone.js": "~0.11.3"
  },
  "devDependencies": {
    "@angular/compiler-cli": "10.2.3",
    "@nativescript/android": "7.0.1",
    "@nativescript/ios": "7.0.5",
    "@nativescript/webpack": "~3.0.8",
    "@ngtools/webpack": "~10.2.0",
    "node-sass": "4.12.0",
    "typescript": "3.9.7"
aaltotsky commented 3 years ago

I also create issue at https://github.com/NativeScript/NativeScript/issues/9031

Tronix117 commented 3 years ago

This issue seems to be important, we also have the same problem on iOS 14.2, and need a fix quite urgentely

HazizKhan commented 3 years ago

+1

Upd4ting commented 3 years ago

+1 still have the same issue on iOS 14.2