<?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 Customize existing widgets in ArcGIS Experience Builder Questions</title>
    <link>https://community.esri.com/t5/arcgis-experience-builder-questions/customize-existing-widgets/m-p/1528566#M14580</link>
    <description>&lt;P&gt;Hi community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to modify the existing filter widget but i'm encountering a problem.&lt;/P&gt;&lt;P&gt;in the "widget.tsx" file there is this code who manage the position of the reset filter button :&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;showResetAtBottom = (resetAll, arrangeType, wrap, filterItems): boolean =&amp;gt; {
    let atBottom = true
    if (
      resetAll &amp;amp;&amp;amp; arrangeType === FilterArrangeType.Inline &amp;amp;&amp;amp; !wrap &amp;amp;&amp;amp;
      (filterItems.length &amp;gt; 1 || (filterItems.length === 1 &amp;amp;&amp;amp; getShownClauseNumberByExpression(filterItems[0].sqlExprObj) === 0))
    ) {
      atBottom = false
    }
    return atBottom
  }

  getItemUseDs = (item: filterItemConfig) =&amp;gt; {
    let useDs = item.useDataSources[0]
    if (item.isGroup &amp;amp;&amp;amp; item.sqlExprObjForGroup) {
      useDs = item.useDataSources.filter(ds =&amp;gt; ds.dataSourceId === item.sqlExprObjForGroup[0].dataSourceId)[0]
    }
    return useDs
  }

  getFilterItems = (config, arrangeType = FilterArrangeType.Block, wrap = false, isPopup = false) =&amp;gt; {
    const showResetAtBottom = this.showResetAtBottom(config.resetAll, arrangeType, wrap, config.filterItems)
    return (
      &amp;lt;div className={classNames('w-100 h-100 d-flex justify-content-between',
        showResetAtBottom ? 'flex-column' : 'flex-row')}
        css={getStyles(this.props.theme, this.props.config)}&amp;gt;
        &amp;lt;div
          className={classNames('w-100 filter-items-container',
            arrangeType &amp;amp;&amp;amp; config.arrangeType === FilterArrangeType.Inline ? 'filter-items-inline' : '',
            wrap ? 'filter-items-wrap' : '', isPopup ? 'filter-items-popup' : '')}
        &amp;gt;
          {(this.state.filterItems as unknown as filterItemConfig[]).map((item, index) =&amp;gt; {
            const useDs = this.getItemUseDs(item)
            const ds = this.isDataSourceRemoved(useDs.dataSourceId) ? null : this.state.dataSources[useDs.dataSourceId]
            const isNotReadyFromWidget = this.state.outputDataSourceIsNotReady[useDs.dataSourceId]
            return (
              &amp;lt;FilterItem
                key={index} id={index} widgetId={this.props.id} intl={this.props.intl}
                selectedDs={ds} useDataSource={useDs}
                isNotReadyFromWidget={isNotReadyFromWidget} logicalOperator={config.logicalOperator} config={item}
                arrangeType={arrangeType} triggerType={config.triggerType} wrap={wrap} omitInternalStyle={config.omitInternalStyle} filterNum={this.state.filterItems.length}
                onChange={this.onFilterItemChange} itemBgColor={this.props.theme.ref.palette.neutral[400]} theme={this.props.theme}
              /&amp;gt;
            )
          })}
        &amp;lt;/div&amp;gt;
        {
          config.resetAll &amp;amp;&amp;amp; &amp;lt;div className={classNames('filter-reset-container', showResetAtBottom ? 'bottom-reset' : 'right-reset')}&amp;gt;
            &amp;lt;Button icon type='default' size='default' className='reset-button'
              style={{ borderRadius: config.triggerType === FilterTriggerType.Toggle ? '16px' : null }}
              title={this.props.intl.formatMessage({ id: 'resetAllFilters', defaultMessage: jimuUIMessages.resetAllFilters })}
              aria-label={this.props.intl.formatMessage({ id: 'resetAllFilters', defaultMessage: jimuUIMessages.resetAllFilters })}
              onClick={this.onResetChange}
            &amp;gt;
              &amp;lt;ResetOutlined /&amp;gt;
            &amp;lt;/Button&amp;gt;
          &amp;lt;/div&amp;gt;
        }
      &amp;lt;/div&amp;gt;
    )
  }&lt;/LI-CODE&gt;&lt;P&gt;My question here is simple : how can I move the button to integrate on the filter dialog box ? I don't want to have this button outside of the dialog box because it consume to much space if I use multiple filter widget.&lt;/P&gt;</description>
    <pubDate>Wed, 28 Aug 2024 11:29:01 GMT</pubDate>
    <dc:creator>JasonBOCQUET</dc:creator>
    <dc:date>2024-08-28T11:29:01Z</dc:date>
    <item>
      <title>Customize existing widgets</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/customize-existing-widgets/m-p/1528566#M14580</link>
      <description>&lt;P&gt;Hi community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to modify the existing filter widget but i'm encountering a problem.&lt;/P&gt;&lt;P&gt;in the "widget.tsx" file there is this code who manage the position of the reset filter button :&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;showResetAtBottom = (resetAll, arrangeType, wrap, filterItems): boolean =&amp;gt; {
    let atBottom = true
    if (
      resetAll &amp;amp;&amp;amp; arrangeType === FilterArrangeType.Inline &amp;amp;&amp;amp; !wrap &amp;amp;&amp;amp;
      (filterItems.length &amp;gt; 1 || (filterItems.length === 1 &amp;amp;&amp;amp; getShownClauseNumberByExpression(filterItems[0].sqlExprObj) === 0))
    ) {
      atBottom = false
    }
    return atBottom
  }

  getItemUseDs = (item: filterItemConfig) =&amp;gt; {
    let useDs = item.useDataSources[0]
    if (item.isGroup &amp;amp;&amp;amp; item.sqlExprObjForGroup) {
      useDs = item.useDataSources.filter(ds =&amp;gt; ds.dataSourceId === item.sqlExprObjForGroup[0].dataSourceId)[0]
    }
    return useDs
  }

  getFilterItems = (config, arrangeType = FilterArrangeType.Block, wrap = false, isPopup = false) =&amp;gt; {
    const showResetAtBottom = this.showResetAtBottom(config.resetAll, arrangeType, wrap, config.filterItems)
    return (
      &amp;lt;div className={classNames('w-100 h-100 d-flex justify-content-between',
        showResetAtBottom ? 'flex-column' : 'flex-row')}
        css={getStyles(this.props.theme, this.props.config)}&amp;gt;
        &amp;lt;div
          className={classNames('w-100 filter-items-container',
            arrangeType &amp;amp;&amp;amp; config.arrangeType === FilterArrangeType.Inline ? 'filter-items-inline' : '',
            wrap ? 'filter-items-wrap' : '', isPopup ? 'filter-items-popup' : '')}
        &amp;gt;
          {(this.state.filterItems as unknown as filterItemConfig[]).map((item, index) =&amp;gt; {
            const useDs = this.getItemUseDs(item)
            const ds = this.isDataSourceRemoved(useDs.dataSourceId) ? null : this.state.dataSources[useDs.dataSourceId]
            const isNotReadyFromWidget = this.state.outputDataSourceIsNotReady[useDs.dataSourceId]
            return (
              &amp;lt;FilterItem
                key={index} id={index} widgetId={this.props.id} intl={this.props.intl}
                selectedDs={ds} useDataSource={useDs}
                isNotReadyFromWidget={isNotReadyFromWidget} logicalOperator={config.logicalOperator} config={item}
                arrangeType={arrangeType} triggerType={config.triggerType} wrap={wrap} omitInternalStyle={config.omitInternalStyle} filterNum={this.state.filterItems.length}
                onChange={this.onFilterItemChange} itemBgColor={this.props.theme.ref.palette.neutral[400]} theme={this.props.theme}
              /&amp;gt;
            )
          })}
        &amp;lt;/div&amp;gt;
        {
          config.resetAll &amp;amp;&amp;amp; &amp;lt;div className={classNames('filter-reset-container', showResetAtBottom ? 'bottom-reset' : 'right-reset')}&amp;gt;
            &amp;lt;Button icon type='default' size='default' className='reset-button'
              style={{ borderRadius: config.triggerType === FilterTriggerType.Toggle ? '16px' : null }}
              title={this.props.intl.formatMessage({ id: 'resetAllFilters', defaultMessage: jimuUIMessages.resetAllFilters })}
              aria-label={this.props.intl.formatMessage({ id: 'resetAllFilters', defaultMessage: jimuUIMessages.resetAllFilters })}
              onClick={this.onResetChange}
            &amp;gt;
              &amp;lt;ResetOutlined /&amp;gt;
            &amp;lt;/Button&amp;gt;
          &amp;lt;/div&amp;gt;
        }
      &amp;lt;/div&amp;gt;
    )
  }&lt;/LI-CODE&gt;&lt;P&gt;My question here is simple : how can I move the button to integrate on the filter dialog box ? I don't want to have this button outside of the dialog box because it consume to much space if I use multiple filter widget.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2024 11:29:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/customize-existing-widgets/m-p/1528566#M14580</guid>
      <dc:creator>JasonBOCQUET</dc:creator>
      <dc:date>2024-08-28T11:29:01Z</dc:date>
    </item>
  </channel>
</rss>

