Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement 'change' event #207

Closed
manolo opened this issue Jul 7, 2016 · 3 comments
Closed

Implement 'change' event #207

manolo opened this issue Jul 7, 2016 · 3 comments
Assignees
Milestone

Comments

@manolo
Copy link
Member

manolo commented Jul 7, 2016

Like in vaadin-combo-box we should consider this event, see vaadin/vaadin-combo-box#271

@robrez
Copy link

robrez commented Apr 4, 2017

It seems that the current value-changed event fires when the vaadin-date-picker value is changed imperitively (not triggered by user input)... I wonder if it would be agreeable to fix that, as well, when the change event is implemented.

@robrez
Copy link

robrez commented Mar 2, 2018

Still would like to see this implemented; Currently, vaadin-date-picker uses vaadin-text-field -- which does publish change events;

However events don't propagate accross shadow dom boundaries. This snippet seems to indicate that vaadin-date-picker would have to play that same game that vaadin-text-field does:

    _onChange(e) {
      // In the Shadow DOM, the `change` event is not leaked into the
      // ancestor tree, so we must do this manually.
      const changeEvent = new CustomEvent('change', {
        detail: {
          sourceEvent: e
        },
        bubbles: e.bubbles,
        cancelable: e.cancelable,
      });
      this.dispatchEvent(changeEvent);
    }

https://github.com/vaadin/vaadin-text-field/blob/master/src/vaadin-text-field-mixin.html#L250-L257

Alternatively, date-picker-light can be used and change events can be added to the light-dom input. I'm not really so sure that the events published by the overlay element would be available or sufficient to indicate a user-initiated change occurred. Maybe value diffing on-blur would work there

@ndormont
Copy link

Probably a noob question: Why not just use on-value-changed ?

@tomivirkki tomivirkki self-assigned this May 29, 2018
@manolo manolo removed the in review label May 30, 2018
@limonte limonte added this to the 3.1.0 milestone Jun 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants