Only populate Attribute Table when expanded

2169
1
Jump to solution
03-01-2016 11:55 AM
HunterCarver
Occasional Contributor

I am running WAB Developer on Portal.

I have a large table that I want to include in the Attribute Table which is filtered to map extent.  Requerying this table on every pan or zoom is a big performance hit.  By default the Attribute Table is collapsed and I would like for it to stay inactive until expanded to prevent the excessive load and then to go inactive again when collapsed.

This way the tables would all be unpopulated until the tab is expanded and then would behave normally.  Then when collapsed would cease populating again. 

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Hunter,

  You state WAB Developer on Portal, this is kind of a contradiction in terms. WAB has three flavors the AGOL version, the local install Developer version, and the built in Portal version. So which are you using? If you truely are using the WAB Dev version than you can make this simple change to the _FeatureTable.js to accomplish what you are desiring.

Location of file: [install dir]\server\apps\[app #]\widgets\AttributeTable\_FeatureTable.js

Function name: _onExtentChange

Changes Line 2 and 3

_onExtentChange: function(params) {
      if (this.matchingMap && this.actived && this.parentWidget.showing) {
        console.info("querying");
        this.startQuery(params.extent);
      }
    },

View solution in original post

0 Kudos
1 Reply
RobertScheitlin__GISP
MVP Emeritus

Hunter,

  You state WAB Developer on Portal, this is kind of a contradiction in terms. WAB has three flavors the AGOL version, the local install Developer version, and the built in Portal version. So which are you using? If you truely are using the WAB Dev version than you can make this simple change to the _FeatureTable.js to accomplish what you are desiring.

Location of file: [install dir]\server\apps\[app #]\widgets\AttributeTable\_FeatureTable.js

Function name: _onExtentChange

Changes Line 2 and 3

_onExtentChange: function(params) {
      if (this.matchingMap && this.actived && this.parentWidget.showing) {
        console.info("querying");
        this.startQuery(params.extent);
      }
    },
0 Kudos