Readonly support for Dropdown #1524

jodymcguire opened this Issue Dec 7, 2016 · 2 comments


None yet

3 participants


I'm submitting a ... (check one with "x")

[X] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already
[ ] support request => Please do not submit support request here, instead see

Plunkr Case (Bug Reports)
Please fork the plunkr below and create a case demonstrating your bug report. Issues without a plunkr have much less possibility to be reviewed.

Current behavior
<p-dropdown id="ruleDomainTableDataRows" [options]="ruleDomainTableDataRowOptions"
[style]="{'width':'330px'}" [filter]="true"
[readonly]="!inEditMode" >

generates a console error:
Can't bind to 'readOnly' since it isn't a known property of 'p-dropdown'.

  1. If 'p-dropdown' is an Angular component and it has 'readOnly' input, then verify that it is part of this module.

If you include the readonly attribute on a p-dropdown control, the error results.

Expected behavior

Once implemented, the readonly attribute, when set to true, would lock interaction with the control, similar to that in place for the pInputText and pInputTextarea controls.

Minimal reproduction of the problem with instructions

What is the motivation / use case for changing the behavior?

Please tell us about your environment:
Windows 10 using VSCode editor.

  • Angular version: 2.2.1
  • PrimeNG version: 1.0.1
  • Browser: [Chrome 54 | IE 11 ]
  • Language: [TypeScript 2.0.0]

  • Node (for AoT issues): node --version = 6.4.0

stawr93 commented Dec 8, 2016 edited

Hello! You can use [disabled] instead of [readonly] and it works fine (



Thank you for your response. As noted above, we are looking for locking of the p-dropdown similar to what is in place for the pInputText and pInputTextarea controls. Disabling in Chrome and IE places styling on the controls that make them very hard to read and is not overridable with css, where as readonly controls maintain the font styling established in the css.

@cagataycivici cagataycivici self-assigned this Jan 10, 2017
@cagataycivici cagataycivici added this to the 2.0 milestone Jan 10, 2017
@cagataycivici cagataycivici changed the title from p-dropdown support for readonly to Readonly support for Dropdown Jan 11, 2017
@cagataycivici cagataycivici added new feature and removed review labels Jan 11, 2017
@cagataycivici cagataycivici added a commit that closed this issue Jan 11, 2017
@cagataycivici cagataycivici Fixed #1524 de06ac7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment