irceline / aq-mobile-be

App for consulting air quality data in Belgium using the ionic framework for Android and iOS
Apache License 2.0
7 stars 8 forks source link

Auto-complete location selection is not working anymore #257

Closed opeeters closed 3 years ago

opeeters commented 3 years ago

On the 52n-v2-upgrade branch the auto-complete of place names does not work anymore. In the browser version the console shows the following error:

ERROR TypeError: Cannot read property 'findIndex' of undefined
    at location-input.component.ts:153
    at Array.filter (<anonymous>)
    at LocationInputComponent.filterItems (location-input.component.ts:153)
    at LocationInputComponent_Template_ion_input_keyup_1_listener (template.html:4)
    at executeListenerWithErrorHandling (core.js:21819)
    at wrapListenerIn_markDirtyAndPreventDefault (core.js:21861)
    at HTMLElement.<anonymous> (platform-browser.js:976)
    at ZoneDelegate.invokeTask (zone-evergreen.js:399)
    at Object.onInvokeTask (core.js:41645)
    at ZoneDelegate.invokeTask (zone-evergreen.js:398)
janschulte commented 3 years ago

Fixed with last commit

opeeters commented 3 years ago

Something is still not 100%. When doing a ionic cordova build android --prod --release, the build ends in a:

ERROR in src/app/v2/components/location-input/location-input.component.html:4:39 - error TS2341: Property 'filterItems' is private and only accessible within class 'LocationInputComponent'.

4     [(ngModel)]="searchText" (keyup)="filterItems()" (click)="openDropdown()">
                                        ~~~~~~~~~~~

  src/app/v2/components/location-input/location-input.component.ts:16:18
    16     templateUrl: './location-input.component.html',
                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Error occurs in the template of component LocationInputComponent.

[ERROR] An error occurred while running subprocess ng.

        ng run app:ionic-cordova-build:production --platform=android exited with exit code 1.

        Re-running this command with the --verbose flag may provide more information.
janschulte commented 3 years ago

Issue is fixed.

opeeters commented 3 years ago

OK .. didn't think it would be that easy :-) Thanks!