File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
src/BootstrapBlazor/Components/Select Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 99}
1010<div @attributes =" @AdditionalAttributes" class =" @ClassString" id =" @Id" >
1111 <div class =" @ToggleClassString" data-bs-toggle =" @ToggleString" data-bs-placement =" @PlacementString" data-bs-offset =" @OffsetString" data-bs-auto-close =" outside" data-bs-custom-class =" @CustomClassString" tabindex =" 0" >
12- <div class =" @PlaceHolderClassString" >@PlaceHolder </div >
12+ @if (! CheckCanEdit ())
13+ {
14+ <div class =" @PlaceHolderClassString" >@PlaceHolder </div >
15+ }
1316 <div class =" multi-select-items" >
1417 @if (DisplayTemplate != null )
1518 {
3740 }
3841 @if (CheckCanEdit ())
3942 {
40- <input type =" text" class =" multi-select-input" autocomplete =" off" tabindex =" 0" data-bb-trigger-key =" @EditSubmitKeyString" />
43+ <input type =" text" class =" multi-select-input" autocomplete =" off" tabindex =" 0" placeholder = " @PlaceholderString " data-bb-trigger-key =" @EditSubmitKeyString" />
4144 }
4245 </div >
4346 @if (! IsSingleLine )
Original file line number Diff line number Diff line change @@ -193,6 +193,8 @@ public partial class MultiSelect<TValue>
193193
194194 private string ? PreviousValue { get ; set ; }
195195
196+ private string ? PlaceholderString => SelectedItems . Count == 0 ? PlaceHolder : null ;
197+
196198 /// <summary>
197199 /// OnParametersSet 方法
198200 /// </summary>
You can’t perform that action at this time.
0 commit comments