File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
src/BootstrapBlazor/Components/Slider Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 2020
2121@code {
2222 RenderFragment RenderRange =>
23- @< input type = " range" id = " @Id" @attributes = " @AdditionalAttributes" class = " @ClassString" disabled = " @IsDisabled" @bind - value = " CurrentValueAsString" @bind - value : event = " @EventString" step = " @StepString" min = " @MinString" max = " @MaxString" > ;
23+ @< input type = " range" id = " @Id" @attributes = " @AdditionalAttributes" class = " @ClassString" disabled = " @IsDisabled" @bind - value = " CurrentValueAsString" @bind - value : event = " @EventString" step = " @StepString" min = " @MinString" max = " @MaxString" @onblur = " OnBlur " > ;
2424}
Original file line number Diff line number Diff line change @@ -110,6 +110,23 @@ public async Task OnValueChanged_OK()
110110 Assert . Equal ( 1 , expected ) ;
111111 }
112112
113+ [ Fact ]
114+ public async Task OnBlurAsync_Ok ( )
115+ {
116+ var blur = false ;
117+ var cut = Context . RenderComponent < Slider < int > > ( builder =>
118+ {
119+ builder . Add ( a => a . OnBlurAsync , v =>
120+ {
121+ blur = true ;
122+ return Task . CompletedTask ;
123+ } ) ;
124+ } ) ;
125+ var input = cut . Find ( "input" ) ;
126+ await cut . InvokeAsync ( ( ) => { input . Blur ( ) ; } ) ;
127+ Assert . True ( blur ) ;
128+ }
129+
113130 [ Fact ]
114131 public void Range_OK ( )
115132 {
You can’t perform that action at this time.
0 commit comments