No announcement yet.
  • Filter
  • Time
Clear All
new posts

    Improvement suggestion: PopUp for ListGrid errors for fields with setHidden(true) and setCanHide(true)

    Hi Isomorphic,

    please see this sample (v10.1p_2017-09-06) and do the following steps:
    • Hide field "Country" via the context menu
    • Click "Edit new"
    • Enter reasonable data
    • Leave the row
    Now in the developer console you will see an error WARN:ListGrid:countryList:setRowErrors() passed error for non-visible field: 'countryName'.
    Here, or in cases where a field is created on ListGrid-display with setHidden(true) and setCanHide(true), you could display the error in a popup, because this error can and should be fixed by the user.
    For fields the user can't display (because they are not in the field-list of setFields() or they are created as setHidden(true) and setCanHide(false)), it should of course stay the same.

    I just had this with a wide ListGrid where I hide many columns by default for the initial display.

    This is not important for me, but I think it would be a valuable addition for the framework. What do you think?

    Best regards

    PS: Also, it seems the sample has some issue or a stale description.
    The code for countryDS shows field countryCode as required="true", but it is not in the sample's JS code and adds work anyway.
    So it does not seem to be really required="true".

    What we would recommend here is:

    1. in an editable grid, don't allow hiding of required fields (or other fields that could show a validation error while hidden)

    2. if you really, really want the field to be able to be hidden, you have several choices, all of which end up awkward: you could use editFailed to force showing the field when it has errors, you could pop an error dialog as you mentioned, or you could just check for the situation when the user leaves the screen. But because all of these are worse than #1, we don't plan to implement any of them in the framework as a default.