diff --git a/packages/oui-select/src/select.controller.js b/packages/oui-select/src/select.controller.js index 76fcc69a..fbe33041 100644 --- a/packages/oui-select/src/select.controller.js +++ b/packages/oui-select/src/select.controller.js @@ -1,4 +1,5 @@ import { addBooleanParameter } from "@ovh-ui/common/component-utils"; +import get from "lodash/get"; export default class { constructor ($attrs, $compile, $element, $scope, $timeout) { @@ -59,4 +60,8 @@ export default class { this.onFocus(); } + + getPropertyValue (item) { + return get(item, this.match, null); + } } diff --git a/packages/oui-select/src/templates/match.html b/packages/oui-select/src/templates/match.html index 4cff7035..f0e561af 100644 --- a/packages/oui-select/src/templates/match.html +++ b/packages/oui-select/src/templates/match.html @@ -15,7 +15,7 @@ + ng-bind-html="$ctrl.getPropertyValue($select.selected) || $select.selected">