cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sajarac
Super User
Super User

Reset Search Text Box

Hello guys I was wondering if this button is possible to implement or in fact exist a better alternative.

 

Capture.JPG

1 ACCEPTED SOLUTION

Accepted Solutions
Abdou
Power Apps
Power Apps

The TextInput control has a property called "Clear" which is to supposed to show/hide the clear button (x) on the control. Unfortunately, this only works on IE/Edge at the moment, and we're tracking that issue.

 

You can work around this issue by doing the following:

  1. Set the OnSelect handler of the button to:
    UpdateContext({ClearSearch: true}); UpdateContext({ClearSearch: false})
  2. Set the Clear property of the TextInput control to false (this is to make sure you don't have two buttons to clear the control in IE/Edge)
  3. Set the "Reset" property of the TextInput control to ClearSearch

Hope this helps 🙂

 

View solution in original post

1 REPLY 1
Abdou
Power Apps
Power Apps

The TextInput control has a property called "Clear" which is to supposed to show/hide the clear button (x) on the control. Unfortunately, this only works on IE/Edge at the moment, and we're tracking that issue.

 

You can work around this issue by doing the following:

  1. Set the OnSelect handler of the button to:
    UpdateContext({ClearSearch: true}); UpdateContext({ClearSearch: false})
  2. Set the Clear property of the TextInput control to false (this is to make sure you don't have two buttons to clear the control in IE/Edge)
  3. Set the "Reset" property of the TextInput control to ClearSearch

Hope this helps 🙂

 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,980)