Skip to content

Support for viewKey and viewValue#78

Open
marchrius wants to merge 12 commits into
dnauck:masterfrom
marchrius:master
Open

Support for viewKey and viewValue#78
marchrius wants to merge 12 commits into
dnauck:masterfrom
marchrius:master

Conversation

@marchrius

Copy link
Copy Markdown

viewKey and viewValue added to support the print of a value of an object.

@Cordobo

Cordobo commented May 15, 2017

Copy link
Copy Markdown

@marchrius At the moment it interferes with #64 at my merged version and it might duplicate functionality.
Can you provide a simple example where and how to use your pr?

Sample array

var cities = [
	{ id: 1, name: 'Berlin' },
	{ id: 2, name: 'London' }
];

Returns the objects from cities-array, where I thought it would return obj.name (which in uib-typeahead is done via "item as item.name ..."

$scope.availableSearchParams = [
	{ key: 'city', name: 'City', suggestedValues: cities }
];

Directive:

<nit-advanced-searchbox
	ng-model="searchParams"
	parameters="availableSearchParams"
	placeholder="Search...">
</nit-advanced-searchbox>

Edit: Updated Issue #40 to #64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants