Skip to content

Commit 3cddb28

Browse files
committed
Placement option added to the example page and documentation
1 parent ec92e28 commit 3cddb28

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

README.md

+12
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,19 @@ Example(the same as in the example file):
404404
]
405405

406406
```
407+
## Positioning the angularStrap select.
408+
The placement option can be used to position a [strapselect](http://mgcrea.github.io/angular-strap/#/selects). Possible values for placement are top, bottom, left, right, auto or any combination (e.g. bottom-right).
409+
Further details can be found in the [angularStrap select documentation](http://mgcrea.github.io/angular-strap/#/selects-usage).
407410

411+
Example (the same as in the example file):
412+
```js
413+
"key": "select_placement",
414+
"placeholder": "Please select from the right.",
415+
"options": {
416+
"placement": "right"
417+
}
418+
419+
```
408420
### And then a submit button.
409421
Not needed, of course, but is commonly used.
410422
```js

app.js

+13
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,12 @@ testApp.controller("appController", ["$scope", "$http", function ($scope, $http)
158158
items: {type: "string"},
159159
description: "If you select more than two items here, it will only show the first two and "
160160
},
161+
select_placement: {
162+
title: "Strap select with position set to right",
163+
type: "string",
164+
enum: ["value1", "value2", "value3"],
165+
description: "Position of the select set using the placement option."
166+
},
161167
"priorities": {
162168
"type": "object",
163169
"properties": {
@@ -329,6 +335,13 @@ testApp.controller("appController", ["$scope", "$http", function ($scope, $http)
329335
{"value": "value4", "name": "text4"}
330336
]
331337
},
338+
{
339+
"key": "select_placement",
340+
"placeholder": "Please select from the right.",
341+
"options": {
342+
"placement": "right"
343+
}
344+
},
332345
{
333346
"key": "priorities.priority",
334347
"title": "Array inside an object, defaults ASF select only",

0 commit comments

Comments
 (0)