<?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: Hub-components Gallery not accepting facet list in ArcGIS Hub Questions</title>
    <link>https://community.esri.com/t5/arcgis-hub-questions/hub-components-gallery-not-accepting-facet-list/m-p/1171108#M5228</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/106358"&gt;@TomWayson&lt;/a&gt;&amp;nbsp;not sure how that facet typo slipped in there. But your solution worked! Thank you again&lt;/P&gt;</description>
    <pubDate>Thu, 05 May 2022 17:19:00 GMT</pubDate>
    <dc:creator>sccwrp</dc:creator>
    <dc:date>2022-05-05T17:19:00Z</dc:date>
    <item>
      <title>Hub-components Gallery not accepting facet list</title>
      <link>https://community.esri.com/t5/arcgis-hub-questions/hub-components-gallery-not-accepting-facet-list/m-p/1170857#M5226</link>
      <description>&lt;P&gt;I am able to create a gallery, but I have not been able to hand off my facet list to the component via the facet attribute.&lt;/P&gt;&lt;P&gt;The JSON facet list I have created works in the storybook demo.&lt;/P&gt;&lt;P&gt;I'm guessing there must be some other method, interface, or component I have to pass the list through in order to turn it into an IFacet, but I haven't been able to find this in the hub-components or hub.js docs.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const facets = [
   {
      "label": "From",
      "key": "from",
      "display": "single-select",
      "options": [
         {
            "label": "SCCWRP",
            "key": "sccwrp",
            "value": "",
            "selected": true,
            "filter": {
               "filterType": "content",
               "owner": "sccwrp"
            }
         }
      ],
      "accordionClosed": true
   },
   {
      "label": "Types",
      "key": "types",
      "display": "multi-select",
      "pageSize": 5,
      "options": [
         {
            "label": "Data",
            "key": "featurelayer",
            "selected": true,
            "filter": {
               "filterType": "content",
               "type": "Feature Service",
               "tags": { "exact": "bight18-sediment-chemistry" }
            }
         }
      ]
   }
]

document.querySelector("body").innerHTML += `
   &amp;lt;arcgis-hub-content-gallery
      query=''
      layout='list'
      show-search=true
      show-sort=true
      sort-order='desc'
      facet={${facets}}&amp;gt;
   &amp;lt;/arcgis-hub-content-gallery&amp;gt;
`;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2022 21:16:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-hub-questions/hub-components-gallery-not-accepting-facet-list/m-p/1170857#M5226</guid>
      <dc:creator>sccwrp</dc:creator>
      <dc:date>2022-05-04T21:16:40Z</dc:date>
    </item>
    <item>
      <title>Re: Hub-components Gallery not accepting facet list</title>
      <link>https://community.esri.com/t5/arcgis-hub-questions/hub-components-gallery-not-accepting-facet-list/m-p/1171078#M5227</link>
      <description>&lt;P&gt;First I notice in the snippet above you have `facet=`, but the property is `facets`&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But even after you fix that, I think you'll still have a problem b/c you are trying to pass the facets as an attribute. For non-scalar properties (i.e. objects and arrays), the way to set them on custom elements is render the element w/o specifying any attribute value for that property, and then use JS after the element has rendered like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const el = document.querySelector('arcgis-hub-content-gallery')
el.facets = facets&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2022 14:32:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-hub-questions/hub-components-gallery-not-accepting-facet-list/m-p/1171078#M5227</guid>
      <dc:creator>TomWayson</dc:creator>
      <dc:date>2022-05-05T14:32:11Z</dc:date>
    </item>
    <item>
      <title>Re: Hub-components Gallery not accepting facet list</title>
      <link>https://community.esri.com/t5/arcgis-hub-questions/hub-components-gallery-not-accepting-facet-list/m-p/1171108#M5228</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/106358"&gt;@TomWayson&lt;/a&gt;&amp;nbsp;not sure how that facet typo slipped in there. But your solution worked! Thank you again&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2022 17:19:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-hub-questions/hub-components-gallery-not-accepting-facet-list/m-p/1171108#M5228</guid>
      <dc:creator>sccwrp</dc:creator>
      <dc:date>2022-05-05T17:19:00Z</dc:date>
    </item>
  </channel>
</rss>

