Commit 78b6faf
committed
Check that
The `allowClear` option may not work as intended if a placeholder
is not used. This is becaise the placeholder holds the value that
the `<select>` should be reset to when the `x` is hit.
An error is now properly raised in the console when Select2 detects
that the `allowClear` option is used without the `placeholder`
option.
This closes select2#3016.allowClear is used with placeholder
1 parent 7a8500f commit 78b6faf
8 files changed
Lines changed: 79 additions & 34 deletions
File tree
- dist/js
- src/js/select2
- selection
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1142 | 1142 | | |
1143 | 1143 | | |
1144 | 1144 | | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
1145 | 1154 | | |
1146 | 1155 | | |
1147 | 1156 | | |
| |||
3796 | 3805 | | |
3797 | 3806 | | |
3798 | 3807 | | |
| 3808 | + | |
3799 | 3809 | | |
3800 | | - | |
3801 | | - | |
3802 | | - | |
3803 | | - | |
3804 | | - | |
3805 | | - | |
| 3810 | + | |
| 3811 | + | |
| 3812 | + | |
| 3813 | + | |
| 3814 | + | |
3806 | 3815 | | |
3807 | 3816 | | |
3808 | 3817 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1142 | 1142 | | |
1143 | 1143 | | |
1144 | 1144 | | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
1145 | 1154 | | |
1146 | 1155 | | |
1147 | 1156 | | |
| |||
3796 | 3805 | | |
3797 | 3806 | | |
3798 | 3807 | | |
| 3808 | + | |
3799 | 3809 | | |
3800 | | - | |
3801 | | - | |
3802 | | - | |
3803 | | - | |
3804 | | - | |
3805 | | - | |
| 3810 | + | |
| 3811 | + | |
| 3812 | + | |
| 3813 | + | |
| 3814 | + | |
3806 | 3815 | | |
3807 | 3816 | | |
3808 | 3817 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1580 | 1580 | | |
1581 | 1581 | | |
1582 | 1582 | | |
| 1583 | + | |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
1583 | 1592 | | |
1584 | 1593 | | |
1585 | 1594 | | |
| |||
4234 | 4243 | | |
4235 | 4244 | | |
4236 | 4245 | | |
| 4246 | + | |
4237 | 4247 | | |
4238 | | - | |
4239 | | - | |
4240 | | - | |
4241 | | - | |
4242 | | - | |
4243 | | - | |
| 4248 | + | |
| 4249 | + | |
| 4250 | + | |
| 4251 | + | |
| 4252 | + | |
4244 | 4253 | | |
4245 | 4254 | | |
4246 | 4255 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1580 | 1580 | | |
1581 | 1581 | | |
1582 | 1582 | | |
| 1583 | + | |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
1583 | 1592 | | |
1584 | 1593 | | |
1585 | 1594 | | |
| |||
4234 | 4243 | | |
4235 | 4244 | | |
4236 | 4245 | | |
| 4246 | + | |
4237 | 4247 | | |
4238 | | - | |
4239 | | - | |
4240 | | - | |
4241 | | - | |
4242 | | - | |
4243 | | - | |
| 4248 | + | |
| 4249 | + | |
| 4250 | + | |
| 4251 | + | |
| 4252 | + | |
4244 | 4253 | | |
4245 | 4254 | | |
4246 | 4255 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
| 175 | + | |
175 | 176 | | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
11 | 20 | | |
12 | 21 | | |
13 | 22 | | |
| |||
0 commit comments