Programmatically change editable p-dropdown

UI Components for Angular
Post Reply
Posts: 1
Joined: 01 Aug 2022, 19:09

01 Aug 2022, 19:18

I have a p-dropdown with a short list of numbers that represent the dpi settings for a device.
The user needs to be able to enter their own dpi in case the one they want isn't listed.
The user should only enter numbers.
Is there a way to limit the input values to only numbers on the p-dropdown?
Or, is there a way to programmatically change the p-dropdown's value if the user entered garbage.
I can get a handle of the p-dropdown in typescript but changing the value field doesn't change it in the UI since it's not a value in the array of dropdown items attached to the dropdown.
Any suggestions?

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 8 guests