I have seen many examples and tutorials about setting up autocomplete in swift. Mostly related to the search bar. But they do not include how to select the item in the drop-down and close the table view. Once you select the item how do you get access to the entire object. Also most data is coming from REST based API. Finally the search autocomplete should be incorporated with the existing view components.
Looking for examples or tutorials that address
adding search autocomplete to existing view
drop down data based on REST API. search term passed to API. Data includes entire object, not just name.
select item from drop-down and get entire object
hide table components and if necessary hide search components.
Related
I want to create tree view items like these, similarly to the ones you see here with Thunder Client extension, unfortunately, they do not have their source code public. Is there any way to go about this using the VSCode API to tap into creating more sophisticated items.
As shown in the documentation example you can implement a selectable List.
I was wondering how would one be able to make the list to support multiple selections.
The method that was used in the example is makeSelectable. There doesn't seem to be any documentation regarding that method and I wasn't able to find anything substantial in the issues of their git project.
Any help will be appreciated.
Create a state variable selectedItems to keep track of selected items of the list.
ListItem supports checkboxes, so you can create a checkbox for each ListItem, add an onCheck handler to it and pass to it a unique value to identify which checkbox is checked and based on that you can modify the state variable selectedItems.
Alternatively, you can use Menu in place of List as it has the property multiple. You can set it to true and that's it.
I'm able to create a DropDown ContentControl in word such that a user can select an item from the drop down and that item becomes the text displayed in the ContentControl. However I've noticed that when you create a citation that drop down list contains command items that can launch dialogs. Is there any way to replicate this behaviour but with custom content controls that launch custom dialogs.
Apparently this is impossible as mentioned in the link below because:
This isn't a "standard" content control. This is something Word puts around a Citation field (and around Date fields and some other kinds). But the functionality is Word-internal and proprietary. It's not something that's exposed in the API. IOW, you can't do that, I'm afraid...
http://social.msdn.microsoft.com/Forums/vstudio/en-US/40542235-1a32-45e6-9aef-55709021ce53/how-do-i-create-a-contentcontrol-with-a-menu-like-when-inserting-a-placeholder?forum=worddev
I have a UITableView with a searchbar. I have a separate page (accessed via a tabBarController) of search tools that can query the data in a number of ways.
The difficulty I'm having is that when I search the data using the custom search tools, I'm filtering the actual tableView, not the UISearchDisplayController's searchResultsTableView.
I would like my custom query tools to effect the searchResultsTableView, but I can not find a way to access it. Also, when I return to the table after using the search tools, the original table is displayed, how can I display the searchResultsTableView?
Any ideas?
Thanks!
How are you populating the searchResultsTableView?
It might be a good idea to keep a separate dataset (maybe an NSArray) for that. When searching begins, matching items would get added to that dataset that, in turn, would be used to populate the searchResultsTableView.
That way, it would be a matter of filtering that specific dataset instead of the original one when using those custom search tools.
As for showing the searchResultsTableView when returning to the view, it depends on what is actually done when moving away from that view. Usual strategies are using setActive:YES on your UISearchDisplayController or storing the search string somewhere and calling setText:SEARCH_STRING on UISearchDisplayController's search bar after returning and retrieving that string.
I developed a Sitecore control I'd like to put into a layout on one page.
In this case it's a registration page, and my control is defined as a sublayout.
What I did is went into the Page Editor interface, and plonked the control into one of the placeholders.
What I want to do now is to create a package only containing the information that this control is on this particular page, without affecting e.g. the content or subitems of this node.
Can you please advise on the best way to create such packag, what exactly to select in the Package Designer?
Thanks
I don't believe the Package Designer gives you granular control to include just specific fields of an item. You need to add the item as whole.
You should configure layouts and renderings in the presentation details of an item OR even better in the __Standard Values of the template.
You can call the presentation details dialog through the content editor. Just select an item in the content tree, click on the Presentation tab in the top ribbon and select Details. You can configure all layouts/renderings for the selected item here.
But ff you want to prevent content changes you really SHOULD configure the presentation in the __Standard Values of the template. This is also the way, which is recommended by Sitecore. If you do this, the layouts are all you have to put into a package.