Please see the attached screen shot. The tool tip for the save button is sh

Please see the attached screen shot. The tool tip for the save button is showing two different text. The first one is “Medical record is required” was should have been replaced with “Ok to save”.Can you help figure out what we are doing wrong?

On other note, we had to stop using it on the combo boxes because the remove tool tip is not working correctly or we are attempting to change the tool tip incorrectly.
18607351.png

Sure thing.

Could you provide me with some code to reproduce the issue or an example snippet showing the way you set the Tooltip?
https://gitlab.com/gsedlacz/tooltips4vaadin/-/issues/37

I also added an issue for the combo box problem:
https://gitlab.com/gsedlacz/tooltips4vaadin/-/issues/36

Which version of Vaadin do you use?

Best Regards
Gerrit

Vaadin 14.6.4

Just upgraded to 2.1.0 and moved the remove to an else clause as you suggested. Problem still persist.

I just took a look at it.

Please revisit the issue:
https://gitlab.com/gsedlacz/tooltips4vaadin/-/issues/37#note_640339446

Best Regards
Gerrit

Took another shot at it in 2.1.2
Best of luck at this point. ;)

The current version (2.3.0) should also fix combobox related Issues.

I verified it using this example:

@Route("")
public class ComboBoxDemoView extends FlexLayout {

  private static final long serialVersionUID = 7591127437515385460L;

  @Data
  private static final class Sean {
    private final String label;
    private final int id;
  }

  public ComboBoxDemoView() {
    ComboBox<Sean> cb = new ComboBox<>("Combo");
    cb.setItems(new Sean("first",0), new Sean("second", 1));
    cb.setHeight("fit-content");

    cb.setItemLabelGenerator(Sean::getLabel);
    cb.setRenderer(new ComponentRenderer<>(item -> {
      Span label = new Span(item.getLabel());
      Tooltips.getCurrent().setTooltip(label, "" + item.getId());
      return label;
    }));

    Tooltips.getCurrent().setTooltip(cb, "initial");

    add(cb);
  }
}

If the issue should still persist please respond to the related issue.
https://gitlab.com/gsedlacz/tooltips4vaadin/-/issues/36

Best Regards