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

BUG | scale-dropdown-select | hiddenInput is defined #2303

Open
mato-a opened this issue Mar 25, 2024 · 0 comments
Open

BUG | scale-dropdown-select | hiddenInput is defined #2303

mato-a opened this issue Mar 25, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@mato-a
Copy link
Contributor

mato-a commented Mar 25, 2024

Scale Version
3.0.0-beta.150

Framework and version
Angular 17.2.0

Current Behavior

TypeError: this.hiddenInput is undefined
    updateInputHidden scale-dropdown-select_13.entry.js:295
    valueChange scale-dropdown-select_13.entry.js:256
    setValue index-6d95a4bc.js:1542
    setValue index-6d95a4bc.js:1539
    set index-6d95a4bc.js:1579
    Angular 4
    RanInputDropdownComponent_Template ran-input-dropdown.component.ts:16
    Angular 48
    RxJS 6
    Angular 20
    RxJS 44
 
<scale-dropdown-select ng-reflect-form="[object Object]">
[index-6d95a4bc.js:2023:51](webpack:///node_modules/@telekom/scale-components/dist/esm/index-6d95a4bc.js)
ERROR Error: NG01203: No value accessor for form control unspecified name attribute. Find more at https://angular.io/errors/NG01203
    Angular 11
    RanInputDropdownComponent_Template ran-input-dropdown.component.ts:24
    Angular 48
    RxJS 6
    Angular 20
    RxJS 43

Expected Behavior
no errors in console, hiddenInput is defined

Code Reproduction

      <scale-dropdown-select
        [formControl]="control"
        [label]="translationKey | translate"
        [invalid]="isInvalid"
        [helperText]="isInvalid ? ('INVALID' | translate) : ''"
        [value]="control.value"
        [id]="key"
        [name]="key"
      >
        <scale-dropdown-select-item *ngFor="let val of values" [value]="val.value">
          <span>{{ val.value }}</span>
          <span *ngIf="val.description"> ({{ val.description }})</span>
        </scale-dropdown-select-item>
        >
      </scale-dropdown-select>

Additional context
Because hiddenInput is not defined, also name prop on input is not defined which prevents formControl accessor to work properly in Angular.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant