<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Add filtering to template picker in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-filtering-to-template-picker/m-p/135328#M12579</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; editor has a method filter tempEditor.templatePicker.grid.filter({label:"A*"}) but i cant figure out how to use it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Jul 2016 21:52:49 GMT</pubDate>
    <dc:creator>Haider_Ali</dc:creator>
    <dc:date>2016-07-05T21:52:49Z</dc:date>
    <item>
      <title>Add filtering to template picker</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-filtering-to-template-picker/m-p/135327#M12578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;I want to add search box that&amp;nbsp; will filter template picker on basis of its label, i have looked into&amp;nbsp; &lt;SPAN style="color: #222222; font-family: Consolas, 'Lucida Console', monospace; font-size: 12px;"&gt;templatePicker.grid.store._arrayOfAllItems&amp;nbsp; it contains the items displayed in template picker with some extra items (extra items appears after every 3 item i think its because i have configured 3 columns in template picker settings ) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: Consolas, 'Lucida Console', monospace; font-size: 12px;"&gt;my question is how can i filter this using it? &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Jul 2016 13:51:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-filtering-to-template-picker/m-p/135327#M12578</guid>
      <dc:creator>Haider_Ali</dc:creator>
      <dc:date>2016-07-03T13:51:57Z</dc:date>
    </item>
    <item>
      <title>Re: Add filtering to template picker</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-filtering-to-template-picker/m-p/135328#M12579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; editor has a method filter tempEditor.templatePicker.grid.filter({label:"A*"}) but i cant figure out how to use it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jul 2016 21:52:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-filtering-to-template-picker/m-p/135328#M12579</guid>
      <dc:creator>Haider_Ali</dc:creator>
      <dc:date>2016-07-05T21:52:49Z</dc:date>
    </item>
    <item>
      <title>Re: Add filtering to template picker</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-filtering-to-template-picker/m-p/135329#M12580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Take a look at the FilterEditor.js file in this github repo. This is part of a Web App Builder widget but you could use the same logic in a custom app: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Esri/solutions-webappbuilder-widgets/blob/master/FilterEditor/FilterEditor.js" title="https://github.com/Esri/solutions-webappbuilder-widgets/blob/master/FilterEditor/FilterEditor.js"&gt;https://github.com/Esri/solutions-webappbuilder-widgets/blob/master/FilterEditor/FilterEditor.js&lt;/A&gt;​&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's a jsbin showing this in a test app: &lt;/P&gt;&lt;P&gt;&lt;A href="http://jsbin.com/zetemipube/edit?html,output" title="http://jsbin.com/zetemipube/edit?html,output"&gt;JS Bin - Collaborative JavaScript Debugging&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jul 2016 20:22:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-filtering-to-template-picker/m-p/135329#M12580</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2016-07-06T20:22:37Z</dc:date>
    </item>
    <item>
      <title>Re: Add filtering to template picker</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-filtering-to-template-picker/m-p/135330#M12581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks to Kelly's Answer i also added&amp;nbsp; a&amp;nbsp; Layer select control ,below is the code (see the Kelly's Answer for more detail)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;function _createTemplateFilter()
{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; widget._origGetItemsFromLayerFunc = widget._getItemsFromLayer;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; widget._getItemsFromLayer = lang.hitch(this, function () {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var items;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; items = widget._origGetItemsFromLayerFunc.apply(templatePicker, arguments);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; items = arrayUtils.filter(items,(item) =&amp;gt;&amp;nbsp; (item.layer.layerId == select.value));
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return items;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });
&amp;nbsp; }&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:33:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-filtering-to-template-picker/m-p/135330#M12581</guid>
      <dc:creator>Haider_Ali</dc:creator>
      <dc:date>2021-12-11T07:33:12Z</dc:date>
    </item>
  </channel>
</rss>

