Skip to content

Commit f15c3c3

Browse files
committed
add option to configure the suggested parameter label text
1 parent 82338fb commit f15c3c3

File tree

4 files changed

+8
-1
lines changed

4 files changed

+8
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* correctly handle isolation scope of 'placeholder' attribute, fixed #15
77
* revert change for issue #3, click on container element enables focus, fixed #14
88
* fixed browser back behaviour when removing queries, pull request #23
9+
* add option to configure the suggested parameter label text
910

1011
### 1.1.1 - 03 February 2015
1112
* update README with latest changes to dist files in bower package

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ param can be a scope variable as well as a hard-coded string.
8888
<td>parameters</td>
8989
<td>List of available parameters to search for.</td>
9090
</tr>
91+
<tr>
92+
<td>parametersLabel</td>
93+
<td>Text for the suggested parameters label, e.g. "Parameter Suggestions".</td>
94+
</tr>
9195
<tr>
9296
<td>placeholder</td>
9397
<td>specifies a short hint in the search box</td>

src/angular-advanced-searchbox.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
ng-model="searchQuery" />
3939
</div>
4040
<div class="search-parameter-suggestions" ng-show="parameters && focus">
41-
<span class="title">Parameter Suggestions:</span>
41+
<span class="title">{{parametersLabel}}:</span>
4242
<span class="search-parameter" ng-repeat="param in parameters | filter:isUnsedParameter | limitTo:8" ng-mousedown="addSearchParam(param)">{{param.name}}</span>
4343
</div>
4444
</div>

src/angular-advanced-searchbox.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ angular.module('angular-advanced-searchbox', [])
1717
scope: {
1818
model: '=ngModel',
1919
parameters: '=',
20+
parametersLabel: '@',
2021
placeholder: '@'
2122
},
2223
replace: true,
@@ -25,6 +26,7 @@ angular.module('angular-advanced-searchbox', [])
2526
'$scope', '$attrs', '$element', '$timeout', '$filter',
2627
function ($scope, $attrs, $element, $timeout, $filter) {
2728

29+
$scope.parametersLabel = $scope.parametersLabel || 'Parameter Suggestions';
2830
$scope.placeholder = $scope.placeholder || 'Search ...';
2931
$scope.searchParams = [];
3032
$scope.searchQuery = '';

0 commit comments

Comments
 (0)