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

Clearing the value in a "value-changed" listener doesn't work #651

Closed
tomivirkki opened this issue May 11, 2018 · 0 comments · Fixed by #810
Closed

Clearing the value in a "value-changed" listener doesn't work #651

tomivirkki opened this issue May 11, 2018 · 0 comments · Fixed by #810
Assignees
Projects

Comments

@tomivirkki
Copy link
Member

Clearing the value in a value-changed event listener should work as expected

it('should clear the value', done =>  {
  comboBox.items = ['bar'];
  comboBox.opened = true;
  const item = comboBox.$.overlay._selector.querySelector('vaadin-combo-box-item');

  comboBox.addEventListener('value-changed', () => {
    if (comboBox.value) {
      comboBox.value = '';
      setTimeout(() => {
        expect(item.selected).to.be.false;
        expect(comboBox.hasAttribute('has-value')).to.be.false;
        done();
      });
    }
  });
  item.click();
});
@jtomass jtomass added this to 📬  Inbox in vaadin-core Mar 29, 2019
@pekam pekam self-assigned this May 16, 2019
pekam added a commit that referenced this issue May 16, 2019
fix #651

The else-if added at line 885 prevents duplicate events.
pekam added a commit that referenced this issue May 16, 2019
fix #651

The else-if added at line 885 prevents duplicate events.
pekam added a commit that referenced this issue May 16, 2019
fix #651

The else-if added at line 886 prevents duplicate events.
pekam added a commit that referenced this issue May 17, 2019
fix #651

The else-if added at line 886 prevents duplicate events.
vaadin-core automation moved this from 📬  Inbox to ✅ Done May 20, 2019
pekam added a commit that referenced this issue May 20, 2019
fix #651

The else-if added at line 886 prevents duplicate events.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
vaadin-core
  
✅ Done
Development

Successfully merging a pull request may close this issue.

2 participants