Open mkrecek234 opened 1 year ago
TreeView needs a Behat test to prevent breaking it in the future again.
Strange but working again without a change on Atk4 side as it seems, closing this issue
Thank you for the feedback.
I identified the issue which persists. Once again, it is a result of all id
typecasting which is being done incorrectly, as an integer is passed to the vue component as a typecasted value with thousand separator. @mvorisek
I believe we should think about getting rid of this, as $model->idField as integers normally should never be typecasted with thousandSeparators. ThousandSeparators is a UI topic ONLY and should ideally only affect displayed values to the customers, whereas any data layer below is not affected by that. @mvorisek
Also if I do not find the time yet to provide your requested behat tests, here is the essence of the issue after further analysis:
id= 1.750
if you have a thousandSeparator .
treeItems
ids
are ALSO typecasted, the Vue TreeItemSelector is not capable if marking the selected item correctly, as it cannot treat ids
like 1.750
as they are no longer integers, even though they match the input field.Consequence: TreeItemSelector requires a proper integer id
field, so current typecasting logic implemented will break this View if you have a thousandSeparator set. The only working workaround is #2022 , otherwise we have to change the logic how id
fields are typecasted (or not) on hidden system fields in HTML.
About your 2nd point - why? please point to vue code, as ID can be a string like UUID or any other string.
Steps to reproduce:
Issue:
Expected behaviour:
This worked properly prior the latest develop commits