The Smart Editor widget displays the template search bar twice.

1275
1
Jump to solution
06-22-2017 01:21 PM
ChristopherSchreiber
Occasional Contributor II

Hello all,

I have noticed that the Smart Editor Widget in WAB DE 2.1 loads the search template bar twice when a layer is chosen,  a feature is added, and then the Smart Editor Widget is closed and reopened.

Example:

  • Open the widget and select a layer to edit:
    • The layer selected is "Polygon"
  • Add a feature
    • Select "Save"
  • Smart Editor template search behaves normal
  • Close the Smart Editor Widget and then reopen it.
    • Result:

If anyone has come across this before, please let me know!

NOTE: To fix the error, the WAB app must be refreshed.

Thanks!

Chris

0 Kudos
1 Solution

Accepted Solutions
ChristopherSchreiber
Occasional Contributor II

Hello all,

I fixed the issue, but I'm sure that it is not the best way to do it. Here is what I came up with. Please let me know if there is a better way to go about this! Thank you!

     postCreate: function () {

          //################# My Edits###############//

          var r = /\d+/g;
          var id = this.id;
          var matchValue = id.match(r);
          console.log(matchValue);

          if (matchValue[0] != 0) {
              domConstruct.destroy("jimu_dijit_SEFilterEditor_" + --matchValue)
          }

          //################ End Edits ##############//
        this._createFilterTool();
      },


This is located in the postCreate function in the "SEFilterEditor" js file.

Thanks!

Chris

View solution in original post

0 Kudos
1 Reply
ChristopherSchreiber
Occasional Contributor II

Hello all,

I fixed the issue, but I'm sure that it is not the best way to do it. Here is what I came up with. Please let me know if there is a better way to go about this! Thank you!

     postCreate: function () {

          //################# My Edits###############//

          var r = /\d+/g;
          var id = this.id;
          var matchValue = id.match(r);
          console.log(matchValue);

          if (matchValue[0] != 0) {
              domConstruct.destroy("jimu_dijit_SEFilterEditor_" + --matchValue)
          }

          //################ End Edits ##############//
        this._createFilterTool();
      },


This is located in the postCreate function in the "SEFilterEditor" js file.

Thanks!

Chris

0 Kudos