FlowingCode / ChipFieldAddon

Vaadin Flow integration of https://github.com/ThomasCybulski/paper-chip
Apache License 2.0
7 stars 5 forks source link

setValue is ignored #25

Closed javier-godoy closed 3 years ago

javier-godoy commented 3 years ago

From thread in Vaadin Directory, Matteo De Franceschi wrote:

I'm not able to use the "setValue" method. It seems it is ignored.

javier-godoy commented 3 years ago

The component doesn't implement setPresentationValue and doesn't call setModelValue thus the "expected" (and incorrect) behavior is that server-side and client-side representations diverge.

https://github.com/FlowingCode/ChipFieldAddon/blob/2c5afa7183161ff3a5258e1c7674e493eaf6f7e6/src/main/java/com/flowingcode/vaadin/addons/chipfield/ChipField.java#L304-L306

See: https://github.com/vaadin/flow/blob/c009afc5c24d8a3d6abc14f6f5cd3faea80c1932/flow-server/src/main/java/com/vaadin/flow/component/AbstractField.java#L41-L47