atk4 / ui

Robust and easy to use PHP Framework for Web Apps
https://atk4-ui.readthedocs.io
MIT License
443 stars 106 forks source link

Added decimal support corrupts id tags in Views #1983

Closed mkrecek234 closed 1 year ago

mkrecek234 commented 1 year ago

The recently merged PR atk4/ui#1981 corrupts data-id tags in views, if you set thousand separator to e.g. . (dot) or ,. Example - a Crud or Table which shows Model data with ids larger than 1000 will render data-id=1.234 corrupting any id-referenced code.

Expected behaviour: Any rendering for classes, attributes should not have UI-type-casted integers - only UI-visible strings should have UI-typecasted floats or integers.

Today's behavior: If you reference to that data-id=1.234 tag, it would interprete it as data-id=1 which is wrong.

The current implementation renders all views unusable if you set thousand-separator, therefore marking it as MAJOR.

mvorisek commented 1 year ago

Duplicate of atk4/ui#1985, remaining typecasting issues tracked in atk4/data#1139.