Help, Angular dropdownlist isn't triggering the (valueChange) event

0 Answers 4 Views
DropDownList
Han
Top achievements
Rank 1
Han asked on 21 Aug 2025, 06:08 PM

Hello,

I have a dropdownlist that I just cannot select anything out of.  Here's my code:

If you look at the changeParentalControl there's a debugger inside that doesn't get hit.

 

HTML:

<kendo-dropdownlist
      [data]="getParentalControlLevels()"
      [textField]="'description'"
      [valueField]="'name'"
      [value]="getParentalControlLevelDisplay(itemPropertyEdit[1])"
      (valueChange)="changeParentalControl($event)"
/>

 

 

TS:

interface ParentalControlLevelDisplay {
  id: number;
  description: string;
  name: string;
}

getParentalControlLevels(): ParentalControlLevelDisplay[] {
    if (this.assignments.length <= 1) return [];
    return [
        {id: 0, name: '', description: 'Adults, Teens, Kids'},
        {id: 1, name: 'teens', description: 'Adults, Teens'},
        {id: 2, name: 'adults', description: 'Adults'},
      ];
 }

getParentalControlLevelDisplay(name: any): ParentalControlLevelDisplay | undefined {
    let itemParentalControlTypes: ParentalControlLevelDisplay[] = [
        {id: 0, name: '', description: 'Adults, Teens, Kids'},
        {id: 1, name: 'teens', description: 'Adults, Teens'},
        {id: 2, name: 'adults', description: 'Adults'},
    ];
    let found = itemParentalControlTypes.find((t) => t.name == name);
    return (found === undefined) ? undefined : found;
}

itemPropertyEdit: [string, string] = ['itemParentalControlLevel', 'adults'];

public changeParentalControl(event: any) {
    debugger;  // <--- this doesn't get hit!
    this.itemPropertyEdit = event;
}

No answers yet. Maybe you can help?

Tags
DropDownList
Asked by
Han
Top achievements
Rank 1
Share this question
or