I use DevExtreme widgets in my project. I would like to hide 'Tree View' when the user click outside of the widget.
My code is below. Can anybody help.
<div class="form">
<dx-text-box
#textBox
placeholder="Search"
[width]="300"
mode="search"
valueChangeEvent="keyup"
value=""
></dx-text-box>
<dx-tree-view
id="simple-treeview"
[items]="products"
[width]="300"
[searchValue]="textBox.value"
(onItemClick)="selectItem($event)"
></dx-tree-view>
<div id="product-details" *ngIf="currentItem.price">
<img [src]="currentItem.image" />
<div class="name">{{currentItem.text}}</div>
<div class="price">{{"$" + currentItem.price}}</div>
</div>
</div>