[TIMOB-24966] Windows: Ti.UI.SearchBar's showCancel=false is ignored
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2017-08-07T22:25:08.000+0000 |
Affected Version/s | Release 6.1.1 |
Fix Version/s | Release 6.1.2 |
Components | Windows |
Labels | merge-6.1.2 |
Reporter | Ricardo Ramirez |
Assignee | Kota Iguchi |
Created | 2017-07-17T21:47:22.000+0000 |
Updated | 2017-09-18T20:29:25.000+0000 |
As far as I see, there's no way to remove "X" icon from UWP's [AutoSuggestBox](https://docs.microsoft.com/en-us/windows/uwp/controls-and-patterns/auto-suggest-box). I would think this as platform component specification to keep consistency with other UWP components such as [TextBox](https://docs.microsoft.com/en-us/windows/uwp/controls-and-patterns/text-box). I would take this ticket as "won't fix" because of platform component spec. [~eharris] [~gmathews] Any thoughts on this?
[~kiguchi] The only way I know of doing that would be to edit the XAML template and then remove the DeleteButton element. I found this UserVoice (it is for TextBox but similar element behaviour) which seems to be on the backlog, neither of the workarounds provided there translate to a AutoSuggestBox (simply at least) https://wpdev.uservoice.com/forums/110705-universal-windows-platform/suggestions/6930042-textbox-property-to-show-hide-delete-button
Thanks [~eharris], it helps. I also found this article: [AutoSuggestBox styles and templates](https://msdn.microsoft.com/en-us/library/windows/apps/mt185404.aspx). This recalls me that we might be able to get the instance of
DeleteButton
component using [VisualTreeHelper](https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.media.visualtreehelper) so we can hide it explicitly. (We used to useVisualTreeHelper
to [get scrollbar component from ListView](https://github.com/appcelerator/titanium_mobile_windows/blob/master/Source/UI/src/ListView.cpp#L82)). I will try.https://github.com/appcelerator/titanium_mobile_windows/pull/1045 https://github.com/appcelerator/titanium_mobile_windows/pull/1046 https://github.com/appcelerator/titanium_mobile_windows/pull/1047
6_1_X: Has been merged as it was a priority. https://github.com/appcelerator/titanium_mobile_windows/pull/1046. Waiting to test 6_2_X and master
[~rramirez] This one is already released, available in [6.1.2.GA](http://docs.appcelerator.com/platform/latest/#!/guide/Titanium_SDK_6.1.2.GA_Release_Note).
[~smohammed] Could you do qe-test for https://github.com/appcelerator/titanium_mobile_windows/pull/1047 ? Then it's ok to merge for [master](https://github.com/appcelerator/titanium_mobile_windows/pull/1045) too because 6_2_X and master are pretty much same now.
Changes seen in 6.2.0 GA.