primeng icon indicating copy to clipboard operation
primeng copied to clipboard

Datatable editable - all inputs have 'required' attribute

Open fxmfr opened this issue 9 years ago • 0 comments

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

fxmfr avatar Oct 18 '17 06:10 fxmfr