woocommerce-ios icon indicating copy to clipboard operation
woocommerce-ios copied to clipboard

Products search field does not have `x` button to reset the keyword

Open iamgabrielma opened this issue 11 months ago • 2 comments

Ref: p91TBi-b2h-p2

Resetting the products search field after using it is not easy. You have to backspace the typed text. What makes this particularly frustrating is that after you’ve searched for and added a product, you most likely want to search for another one. People expected a cross to appear on the right of the search field.

  1. Go to Order > + > Add Products
  2. Write something on the search bar in the top
  3. Observe there's no x to reset the search words

Other instances of search bar across the app does have this functionality.

iamgabrielma avatar Mar 20 '24 01:03 iamgabrielma

Thanks for reporting! 👍

dangermattic avatar Mar 20 '24 01:03 dangermattic

The x button is missing from the search fields using our SearchHeader SwiftUI component, which under the hood uses a TextField. The last time I checked, there wasn't any non-hacky way in SwiftUI to add that button to a TextField.

The only option I found before was to use the .searchable modifier, but I'm not sure if that works for performing remote searches or if it can only search local data.

rachelmcr avatar Mar 28 '24 13:03 rachelmcr