Skip to content

Commit 82c6788

Browse files
committed
Add unique parameter for Attribute searches - when present, the widget will query the
layer for distinct values and populate the drop-down for the specific search field. No longer limited to 5 search fields. Might need to adjust the css `height` when more fields are present.
1 parent 3dae7cc commit 82c6788

File tree

5 files changed

+358
-124
lines changed

5 files changed

+358
-124
lines changed

config/searchWidget.js

+5-9
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,7 @@ define([
6363
name: 'Type of Damage',
6464
label: 'Type of Damage',
6565
expression: '(typdamage LIKE \'[value]%\')',
66-
placeholder: 'Enter the text Destroyed, Major or Minor',
67-
values: ['Destroyed', 'Major', 'Minor'],
68-
minChars: 3
66+
values: ['*', 'Destroyed', 'Major', 'Minor']
6967
}
7068
],
7169

@@ -239,12 +237,10 @@ define([
239237
name: 'Search For Police Station By Name',
240238
searchFields: [
241239
{
242-
name: 'Police Station',
243-
label: 'Name',
244-
expression: '(PDNAME LIKE \'[value]%\')',
245-
placeholder: 'Enter the Name of the Police Station',
246-
required: true,
247-
minChars: 3
240+
name: 'PDNAME',
241+
label: 'Station Name',
242+
expression: '(PDNAME = \'[value]\')',
243+
unique: true
248244
}
249245
],
250246

0 commit comments

Comments
 (0)