-2

How to get the clarity drop down open or close state to toggle the caret up or down icon?

dropdowns

AGS
  • 1
  • 2
  • I'm sorry, can you try to rephrase your question with more detail? Its not clear what you're asking. – Jeremy Wilken Jul 03 '18 at 16:01
  • https://vmware.github.io/clarity/documentation/v0.12/dropdowns dropdown caret icon is not changing when it is in open state. – AGS Jul 05 '18 at 04:03

1 Answers1

0

This is not done intentionally, though you can do it yourself fairly easily by wrapping the template with a two-way binding like:

<button type="button" class="btn btn-outline-primary" clrDropdownTrigger>
    Dropdown
    <clr-icon shape="caret down" *ngIf="!buttonOpen"></clr-icon>
    <clr-icon shape="caret up" *ngIf="buttonOpen"></clr-icon>
</button>
<ng-template [(clrIfOpen)]="buttonOpen">
<clr-dropdown-menu>
...
</clr-dropdown-menu>
</ng-template>

https://stackblitz.com/edit/clarity-icurbz?file=app%2Fapp.component.html

Jeremy Wilken
  • 6,965
  • 22
  • 21