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

Datatable editable - all inputs have 'required' attribute #4195

Closed
fxmfr opened this issue Oct 18, 2017 · 0 comments
Closed

Datatable editable - all inputs have 'required' attribute #4195

fxmfr opened this issue Oct 18, 2017 · 0 comments
Assignees
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@fxmfr
Copy link

fxmfr commented Oct 18, 2017

I'm submitting a ...

[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)
http://plnkr.co/edit/z2YMc8pMqtA18X1uRK3Y?p=preview

Official showcase https://www.primefaces.org/primeng/#/datatable/editable is also affected.

Current behavior
In an editable datatable all inline editing inputs have 'required' attribute, which makes no sense to me.
Seems to be related to #1889.

Expected behavior
Attribute 'required' should not being set for inline editing inputs as default. If someone needs 'required' attribute, it could be set using template. Maybe, if defined, dataKey field could be set to 'required' automatically.

Minimal reproduction of the problem with instructions
In plunkr above, check datatables inputs in dev tools - they all have 'required' attribute. If value of an input is deleted, it becomes invalid.

What is the motivation / use case for changing the behavior?
Not all fields of a table are mandatory always and users should be able to delete value of a field.

Please tell us about your environment:
Windows 10

  • Angular version:
    4.4.4

  • PrimeNG version:
    4.2.2

  • Browser:
    Chrome 61

@cagataycivici cagataycivici self-assigned this Oct 19, 2017
@cagataycivici cagataycivici added the Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add label Oct 19, 2017
@cagataycivici cagataycivici added this to the 4.2.3 milestone Oct 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

No branches or pull requests

2 participants