Tradeshift / tradeshift-ui

Tradeshift UI is a framework-agnostic JavaScript library to help Tradeshift App developers to create cohesive user experiences and to provide reusable UI components.
https://ui.tradeshift.com
Other
33 stars 44 forks source link

`onidle` is not called when clicking close button of search. #503

Closed wangcansunking closed 6 years ago

wangcansunking commented 6 years ago

Choose the section that applies to you and use the template to help us figure out how we can help you.


Bug report

Tradeshift UI version affected

v9.3.11 v10

Expected Behavior

Here I use the search of toolbar as the expected behavior. image

Actual Behavior

image

Steps to reproduce

var search = ts.ui.get('#mysearch');
search.value = 'Hello world';
search.onidle = function(value) {
    ts.ui.Notification.success(value);
};

Screenshots (optional)


Feature request

Description of feature

Example use cases and/or Prototype links

Designs and/or Prototype screenshots

wiredearp commented 6 years ago

... but onsearch is called; and also used as example in the documentation: http://ui.tradeshift.com/#components/search/. onidle is for when the user does nothing, whereas onsearch is for when the user does something (presses ENTER of clears the search).