p-dropdown optionvalue not binding with formcontrolname #122
-
<p-dropdown [options]="societyList" formcontrolName="societyId" societyId is a my formcontrolname |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
This comment was marked as off-topic.
This comment was marked as off-topic.
-
another issue with this is when i using tabindex directive with dropdown its not behaving properly do u have any resolution on this if yes please share <p-dropdown [options]="stateList" formControlName="state" placeholder="Select a State"
optionLabel="nam" optionValue="id" [showClear]="true" tabIndex="10"></p-dropdown> this is my code when i remove tabindex it works perfectly //Custom Directive Code
import { Directive, Input, ElementRef, HostListener, OnInit } from '@angular/core';
import { TabService } from './tab.service';
import {Subject} from 'rxjs';
type IKNOWISNUMBER = any;
type IKNOWISSTRING = any;
@Directive({
selector: '[tabIndex]'
})
export class TabDirective implements OnInit{
private _index: number=0;
get index(): IKNOWISNUMBER{
return this._index;
}
@Input('tabIndex')
set index(i: IKNOWISSTRING){
this._index = parseInt(i);
}
@HostListener('keydown', ['$event'])
onInput(e: any) {
if (e.which === 13) {
this.tabService.selectedInput.next(this.index + 1)
e.preventDefault();
}
}
constructor(private el: ElementRef, private tabService: TabService) {}
ngOnInit(){
this.tabService.selectedInput
.subscribe((i) => {
// console.log(i, this.index);
if (i === this.index){
this.el.nativeElement.focus();
}
});
}
} it works properly on other controls but not on p-dropdown |
Beta Was this translation helpful? Give feedback.
-
TabIndex seems like a bug, this week the team is on a11y improvements to add WCAG compliance. In this case, tabIndex is applied to the wrong element it seems not the keyboard accessible hidden one. It should be resolved in next release. |
Beta Was this translation helpful? Give feedback.
TabIndex seems like a bug, this week the team is on a11y improvements to add WCAG compliance. In this case, tabIndex is applied to the wrong element it seems not the keyboard accessible hidden one. It should be resolved in next release.