Skip to content

edit-bitmask CDR does not visually indicate required state and swallows server errors #502

Description

@jd-igf

Is this a regression?

Yes

Severity

⚪ Cosmetic – visual or non-functional issue

Please provide the branch(es) you discovered this issue in

v92

Environment Details

Edge 149.0.4022.80, Windows 11, 9.2.2

Please provide a minimal set of steps to reproduce the issue

  1. Open the detail page containing the mandatory bitmask column.
  2. Observe the field while it is empty:
    • ❌ No asterisk (*) is shown next to the label.
    • ❌ The outline is not red.
    • ❌ The placeholder text is not red.
    • ❌ No "This field is mandatory." message is shown below the field.
  3. Select one or more options, then click the clear (x) button of the
    eui-select without focusing the field first.
    • ❌ The field does not transition to the invalid state — no red styling
      and no error message appears.

Description

The EditBitmaskComponent (CDR editor for bitmask columns) has two issues
that make it inconsistent with other CDR editors (e.g. edit-default,
edit-date):

1. Missing visual feedback for required fields

  • No asterisk (*) is shown next to the label when columnContainer.isValueRequired is true.
  • The field outline does not turn red when the field is required but empty/invalid.
  • The placeholder text remains in its default color even when the field is invalid.
  • The label color does not reflect the invalid state when the field is unfocused.
  • No inline error message is displayed when the field is left empty.
  • Clearing the value via the eui-select clear button (without focusing the field first)
    does not update the touched/dirty state, so the required-styling never kicks in.

2. Server errors are silently swallowed

In writeValue(), the catch block sets this.lastError = undefined instead
of this.lastError = e:

} catch (e) {
  this.logger.error(this, e);
  this.lastError = undefined;   // bug
}

Describe what you expected to happen versus what actually happened

The edit-bitmask CDR should behave consistently with other CDR editors:

  • Show a * after the label when the field is required.
    
  • Turn the outline, label, asterisk, and placeholder red when the field is required and empty/invalid.
    
  • Show an inline mat-error ("This field is mandatory.") when the field is empty.
    
  • Correctly transition to the invalid state when the user clears the value via the clear button.
    

Server errors raised during updateValue() must be assigned to lastError
so that the generalError validator triggers and the corresponding
is rendered.

Relevant logs or console output

Add a screenshot(s) if that helps illustrate the problem

No response

Suggested Fix

See @my temp fix

Anything else?

No response

Before submitting...

  • I have searched for existing issues that match this one on github and on the community support page
  • I have included all necessary details to reproduce this issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions