flow icon indicating copy to clipboard operation
flow copied to clipboard

Issues with NumberField broken when using vaadin-archetype-application

Open appreciated opened this issue 7 years ago • 4 comments

Description of the bug

The NumberField Component seems to be broken in Vaadin 14.0.7.

grafik

Minimal reproducible example

Create a project using the vaadin-archetype-application archetype

public class MainView extends VerticalLayout {
    public MainView() {
        Button button = new Button("Click me", event -> Notification.show("Clicked!"));
        TextField placeholderField = new TextField();
        placeholderField.setPlaceholder("Placeholder");
        NumberField numberField = new NumberField("Years of expertise");
        add(button, placeholderField, numberField);
    }
}

Expected behavior

The NumberField should behave as expected

Actual behavior

The NumberField cannot be used

Versions:

- Vaadin 14.0.7 / Flow version 2.0.14
- Java version 8 and 11
- Browser version updated FF and Chrome

appreciated avatar Oct 04 '19 13:10 appreciated

I was only able to get the vaadin-archetype-application project running by replacing the package-lock.json with one from another working project. Why is the project not able to recover on it's own by executing a clean install? If the package-lock.json is deleted another invalid will be generated.

appreciated avatar Oct 04 '19 14:10 appreciated

I think this issue is similar / related to #https://github.com/vaadin/vaadin-text-field-flow/issues/234 I am not using vaadin-archetype-application but an application using the app-layout addon by @appreciated and Spring Boot.

lucastanzani avatar Oct 05 '19 11:10 lucastanzani

See https://github.com/vaadin/vaadin-themable-mixin/issues/65 (fixed in https://github.com/vaadin/vaadin-themable-mixin/releases/tag/v1.5.1).

heruan avatar Oct 05 '19 11:10 heruan

Deleting:

  • node_modules
  • target
  • package-lock.json

Followed by a mvn clean install

After this the package-lock.json should now contain the new:

"dependencies": {
 "@vaadin/vaadin-themable-mixin": {
      "version": "1.5.1",
       ....
    }
}

Thanks @heruan for the hint.

appreciated avatar Oct 05 '19 12:10 appreciated