ComboBox shows RED color for custom values

Here is the ComboBox I’ve private final ComboBox<ExpenseCategory> expenseCategory = new ComboBox<>("ExpenseCategory"); . I want to let user add custom values so I’ve this.expenseCategory.setAllowCustomValue(true);. Now, the problem is, it shows RED as you see in the image. What could be the issue?

Did you read the docs what you have to implement to get it working?

I think you’re referring to this one comboBox.addCustomValueSetListener(e -> { String customValue = e.getDetail(); items.add(customValue); comboBox.setItems(items); comboBox.setValue(customValue); });

Yes :shushing_face:

The problem is that ( or I don’t know how ), it works for in-memory values. In my case, the values would be in a table. The user can look for the category he can just enter here and some other values and finally when clicks SAVE this will be saved in the table. Untill then, it won’t be available in the table

Either remove the table out of the scope of the problem by using an in-memory approach or add a “add button” next to it. There are probably other solutions, but those could easily create maintenance burden