npm-dropdown-package 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  class GenerateDropdownData {
2
2
  constructor(featureLayers, fieldNames) {
3
- // Define method
3
+ // Define 'Method'
4
4
  this.dropDownQuery = async () => {
5
5
  // ################### One Feature Layer ################### //
6
6
  if (this.featureLayers.length === 1) {
@@ -43,6 +43,7 @@ class GenerateDropdownData {
43
43
  }
44
44
  else if (this.fieldNames[2] === undefined) {
45
45
  var query12 = this.featureLayers[0].createQuery();
46
+ // query12.outFields = ["*"];
46
47
  query12.outFields = [this.fieldNames[0], this.fieldNames[1]];
47
48
  query12.orderByFields = [this.fieldNames[0], this.fieldNames[1]];
48
49
  query12.groupByFieldsForStatistics = [
@@ -95,13 +96,12 @@ class GenerateDropdownData {
95
96
  else {
96
97
  // 1. Pairs for 1st feature layer
97
98
  var query13 = this.featureLayers[0].createQuery();
98
- query13.outFields = [this.fieldNames[0], this.fieldNames[1]];
99
+ query13.outFields = ["*"];
99
100
  query13.orderByFields = [this.fieldNames[0], this.fieldNames[1]];
100
101
  query13.groupByFieldsForStatistics = [
101
102
  this.fieldNames[0],
102
103
  this.fieldNames[1],
103
104
  ];
104
- query13.where = `${this.fieldNames[0]} IS NOT NULL`;
105
105
  const pairQ = this.featureLayers[0]
106
106
  .queryFeatures(query13)
107
107
  .then((response) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "npm-dropdown-package",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "A package to create an object-array using feature layers hosted in Portal for ArcGIS for react-select dropdown",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
package/src/index.ts CHANGED
@@ -64,6 +64,7 @@ class GenerateDropdownData {
64
64
  // Two dropdowns (= two fields):-----------------------
65
65
  } else if (this.fieldNames[2] === undefined) {
66
66
  var query12 = this.featureLayers[0].createQuery();
67
+ // query12.outFields = ["*"];
67
68
  query12.outFields = [this.fieldNames[0], this.fieldNames[1]];
68
69
  query12.orderByFields = [this.fieldNames[0], this.fieldNames[1]];
69
70
  query12.groupByFieldsForStatistics = [
@@ -135,13 +136,12 @@ class GenerateDropdownData {
135
136
  } else {
136
137
  // 1. Pairs for 1st feature layer
137
138
  var query13 = this.featureLayers[0].createQuery();
138
- query13.outFields = [this.fieldNames[0], this.fieldNames[1]];
139
+ query13.outFields = ["*"];
139
140
  query13.orderByFields = [this.fieldNames[0], this.fieldNames[1]];
140
141
  query13.groupByFieldsForStatistics = [
141
142
  this.fieldNames[0],
142
143
  this.fieldNames[1],
143
144
  ];
144
- query13.where = `${this.fieldNames[0]} IS NOT NULL`;
145
145
 
146
146
  const pairQ: any = this.featureLayers[0]
147
147
  .queryFeatures(query13)