Placeholder should be hidden when a value is selected
mvysny opened this issue ยท 7 comments
Hey Goran what's up? :-D
When you set a placeholder and the user selects a bunch of values, the placeholder should probably be hidden. That would be in line to ComboBox or TextField - if a value is selected or a text is typed, the placeholder is no longer shown.
This is the current behavior:
The following code reproduces the issue:
@Route("")
public class MainView extends VerticalLayout {
public MainView() {
final MultiselectComboBox<String> cb = new MultiselectComboBox<>();
cb.setPlaceholder("Select a value");
cb.setItems("1", "2", "3");
add(cb);
}
}
Hi @mvysny, thanks for reporting this issue :)
Could you please give it a try with the latest release candidate version 4.0.0-rc1
and let me know if this still happens?
Thanks.
Hi Goran, sorry I was not able to test the addon. The minute I add multiselect-combo-box-flow to even a simple project, Vaadin crashes client-side with NotSupportedError: CustomElementRegistry.define: 'vaadin-lumo-styles' has already been defined as a custom element
. I've tried both 4.0.0-rc1 and 4.0.0-rc2, plus Vaadin 23.0.0.beta2 ๐ค
Thanks for the feedback Martin. May I ask which version of Vaadin did you try with?
Sure, thanks Goran, I tried Vaadin 23.0.0.beta1 and 23.0.0.beta2
Okay, thanks for the update ๐ I haven't checked with Vaadin 23 yet, 22 has worked well so far at least.
Oh, I'm sorry about that, I'll test with Vaadin 22, thank you :) I've filed the NotSupportedError
as a separate ticket, let's ignore it here: #99
Thank you, I've tested the component 4.0.0-rc2 with Vaadin 22 and indeed the placeholder is hidden. Thanks a ton for fixing this!