Skip to content

Commit 342f53a

Browse files
doc(multiselect): Fix Select All checkbox click (#1407)
Co-authored-by: Dimo Dimov <[email protected]>
1 parent d389514 commit 342f53a

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

knowledge-base/multiselect-checkbox-in-dropdown.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -91,37 +91,40 @@ You can add a "Select All" feature through the `HeaderTemplate` - it only has to
9191
AutoClose="false"
9292
Placeholder="Write the roles you need">
9393
<HeaderTemplate>
94-
<label class="select-all-item">
94+
<div class="select-all-item">
9595
<TelerikCheckBox TValue="bool"
9696
Value="@IsAllSelected()"
97-
ValueChanged="@( (bool v) => ToggleSelectAll(v) )">
97+
ValueChanged="@( (bool v) => ToggleSelectAll(v) )"
98+
Id="ms-select-all-checkbox">
9899
</TelerikCheckBox>
99-
&nbsp;Select All
100-
</label>
100+
<label for="ms-select-all-checkbox">&nbsp;Select All</label>
101+
</div>
101102
</HeaderTemplate>
102103
<ItemTemplate>
103104
<input type="checkbox"
104105
id="@( "cb" + context.Replace(" ", "") )"
105106
class="k-checkbox k-checkbox-md"
106107
checked="@GetChecked(context)">
107-
<label class="k-checkbox-label"
108-
for="@( "cb" + context.Replace(" ", "") )">
109-
@context
110-
</label>
108+
@context
111109
</ItemTemplate>
112110
113111
</TelerikMultiSelect>
114112
115113
<style>
116114
.select-all-item {
117115
padding: 4px 8px;
118-
display: block;
116+
display: flex;
119117
cursor: pointer;
120118
}
121119
122120
.select-all-item:hover {
123121
background: rgba(0, 0, 0, 0.06);
124122
}
123+
.select-all-item label {
124+
display: block;
125+
flex: 1 1 auto;
126+
cursor: pointer;
127+
}
125128
</style>
126129
127130
@foreach (var item in TheValues)

0 commit comments

Comments
 (0)