Our blazing fast Grid component built with pure JavaScript


Post by scebotari66 »

Hello team!

The clearable field config API docs state the folowing:

Show a trigger to clear field, if this field is not readOnly. The trigger is available in the triggers object under the name clear.

Right now the clear trigger still shows up on readonly fields. It also appears on disabled fields. Neither of those should display the clear trigger.

Code sample: https://codepen.io/scebotari66/pen/MYyaJwr

Regards,
Serghei Cebotari


Post by mats »

Confirmed - we'll get it fixed! https://github.com/bryntum/support/issues/12217


Post by scebotari66 »

Thanks Mats!

Great to hear.

Regards,
Serghei Cebotari


Post by scebotari66 »

It is marked as fixed in 7.0.0, but actually it is not. Still reproducible.

Regards,
Serghei Cebotari


Post by alex.l »

Hi,

Thank you for the report, reopened!

All the best,
Alex Lazarev

How to ask for help? Please read our Support Policy


Post by Animal »

The fix implemented was

.b-field {
    &.b-read-only,&.b-disabled {
        .b-field-trigger {
            pointer-events : none;
            opacity        : .5;
        }
    }
}

So it made the tiggers less visible when disabled but not hidden. It is still valid information for a user to be able to "read" the UI.

If you want to make the clear trigger totally hidden when disabled or read-only, you can use CSS to do it:

.b-field {
    &.b-read-only,&.b-disabled {
        .b-field-trigger[data-ref="clear"] {
            display : none;
        }
    }
}

Post by johan.isaksson »

The discussion leading up to fading the triggers instead of fully hiding them was that it leads to a less jumpy UI for forms etc that disable / enable some fields based on others and similar use cases. Especially for triggers placed first in the fields.

The CSS suggested by Nige above will hide the triggers fully, but we are open to consider adding a config to control this behavior too - please let us know your thoughts on it

Best regards,
Johan Isaksson

Post Reply