Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Does this support to angular v18 and Material 18 #518

Open
praason opened this issue Jan 27, 2025 · 8 comments
Open

[FEATURE] Does this support to angular v18 and Material 18 #518

praason opened this issue Jan 27, 2025 · 8 comments
Labels

Comments

@praason
Copy link

praason commented Jan 27, 2025

I've encountered some hiccups with Angular v18. Can you confirm if this version is supported? If not, are there any plans to roll out an update soon?

@praason praason changed the title [FEATURE] Does this support to angular v18 [FEATURE] Does this support to angular v18 and Material 18 Jan 27, 2025
@macjohnny
Copy link
Member

yes, angular 18 is supported, see https://github.com/bithost-gmbh/ngx-mat-select-search?tab=readme-ov-file#current-release

can you please paste your package.json and the error you get?

can you also try with version 7.0.9?

@praason
Copy link
Author

praason commented Jan 27, 2025

We're currently using the following setup.

ngx-mat-select-search: ^7.0.8
@angular/material: ^18.2.14

Search box is not display

@macjohnny
Copy link
Member

that should work. how do you use it in the template? how do you import the module?
are there any errors in the console in the browser?

@praason
Copy link
Author

praason commented Jan 28, 2025

Sharing HTML template

<mat-form-field>
   <mat-select
   (click)="clearErrorStatus()"
   placeholder="Country"
   (selectionChange)="getPlaceAutocomplete()"
   matInput
   formControlName="country">
   <mat-option>
      <ngx-mat-select-search
      formControlName="countryFilter"
      [placeholderLabel]="'Find Country'"
      [noEntriesFoundLabel]="'No matching country found'"
      [preventHomeEndKeyPropagation]="true"
      clearSearchInput="true">
      </ngx-mat-select-search>
   </mat-option>
   <mat-option
   class="fs-exclude"
   *ngFor="let country of filteredCountry$ | async"
   [value]="getCountryCodeUseValue(country)">
   {{ country }}</mat-option
      >
   </mat-select>
</mat-form-field>

TS

@ViewChild("addresstext", { static: false }) addresstext: ElementRef;
@ViewChild("countrySelect", { static: false }) countrySelect: MatSelect;
Image

Below error in console:
NG01203: No value accessor for form control name: 'countryFilter'

but if we add ngDefaultControl for input its gone but still not search box shown

@macjohnny
Copy link
Member

@praason
Copy link
Author

praason commented Jan 28, 2025

Everything is in place and followed same import and working fine with angular 16, It seems issue with 18

@macjohnny
Copy link
Member

can you paste your full package.json?
are there any compilation errors?

@macjohnny
Copy link
Member

@praason any update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants