5

I have a ui-select-match element, and when opening the element and hovering (highlighting) over a row I need a tooltip to show the full content of the row in case of text overflow that is cut off by the border.

It seems like something that should have been a feature of ui-select but I couldn't find any reference for such a thing. So far I only found solutions that show the entire text inside the row.

Thanks!

1 Answer 1

7

What about putting title="{{selected.name}}" on the element holding the ui-select-match directive. The tooltip will be in any case though, not only when text overflows.

Code:

<ui-select ng-model="address.selected"
             theme="bootstrap"
             ng-disabled="disabled"
             reset-search-input="false"
             style="width: 300px;">
    <ui-select-match title="{{address.selected.formatted_address}}" placeholder="Enter an address...">{{$select.selected.formatted_address}}</ui-select-match>
    <ui-select-choices repeat="address in addresses track by $index"
             refresh="refreshAddresses($select.search)"
             refresh-delay="0">
      <div ng-bind-html="address.formatted_address | highlight: $select.search"></div>
    </ui-select-choices>
</ui-select>

See plnkr

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for your answer. I thought about it as an option but I need the tooltip to show only with text overflows.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.