Skip to content

tui-select disabled #6295

Answered by waterplea
expdts asked this question in Q&A
Dec 20, 2023 · 2 comments · 2 replies
Discussion options

You must be logged in to vote

В твоём примере вот такая функция подойдёт:

readonly handler = item => !item.isActive
<tui-data-list-wrapper
  *tuiDataList
  [items]="listData"
  [itemContent]="testListDataContent"
  [disabledItemHandler]="handler"
/>

Если использовать tui-data-list, то там все tuiOption будут в шаблоне и можно написать:

<button *ngFor="..." tuiOption [disabled]="!item.isActive" ...

А в стилях прописать:

[tuiOption]:disabled {
  background: pink;
}

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@waterplea
Comment options

Answer selected by expdts
@expdts
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants