Double icon at checkbox

I added an icon to a checkbox with

<checkbox id="warn" caption="Warning" icon="WARNING" contextHelpText="some helpful text"/>

but the result has the icon before the caption and after the checkbox.
Screenshot-2023-04-12-at-13-49-58-Warning

Is there a way to avoid the second icon (and move the help text icon closer to the checkbox)?

Hello!

Thank you for reporting the problem! I’ve create an issue: CheckBox in forms duplicates its icon · Issue #1604 · jmix-framework/jmix · GitHub

To workaround the problem you can extends theme and add custom selector to disable second icon:

<checkBox id="warn" caption="Warning" icon="WARNING" stylename="form-disable-checkbox-icon
          contextHelpText="some helpful text"/>
.form-disable-checkbox-icon span.v-icon {
  display: none;
}

To move help icon closer set width="AUTO" to the checkBox.

1 Like