Datatable editable - all inputs have 'required' attribute #4195
Labels
Type: Enhancement
Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone
I'm submitting a ...
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
The text was updated successfully, but these errors were encountered: