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

Readonly support for Dropdown #1524

Closed
jodymcguire opened this issue Dec 7, 2016 · 2 comments
Closed

Readonly support for Dropdown #1524

jodymcguire opened this issue Dec 7, 2016 · 2 comments
Assignees
Labels
Type: New Feature Issue contains a new feature or new component request
Milestone

Comments

@jodymcguire
Copy link

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 https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

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.

http://plnkr.co/edit/BMj7AUeODPqmjlLvd6UY

Current behavior
<p-dropdown id="ruleDomainTableDataRows" [options]="ruleDomainTableDataRowOptions"
formControlName="ruleDomainTableData"
[style]="{'width':'330px'}" [filter]="true"
[(ngModel)]="selectedRuleDomainTableDataRowOption"
(onChange)="setDisplayValue()"
[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
Copy link

stawr93 commented Dec 8, 2016

Hello! You can use [disabled] instead of [readonly] and it works fine (http://plnkr.co/edit/39QUFR)

@jodymcguire
Copy link
Author

Hi,

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 the Status: Pending Review Issue or pull request is being reviewed by Core Team label Jan 10, 2017
@cagataycivici cagataycivici added this to the 2.0 milestone Jan 10, 2017
@cagataycivici cagataycivici changed the title p-dropdown support for readonly Readonly support for Dropdown Jan 11, 2017
@cagataycivici cagataycivici added Type: New Feature Issue contains a new feature or new component request and removed Status: Pending Review Issue or pull request is being reviewed by Core Team labels Jan 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: New Feature Issue contains a new feature or new component request
Projects
None yet
Development

No branches or pull requests

3 participants