File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414 <Copyright />
1515 <PackageTags >blazor blazor-component blazor-dialog dialog modal blazor-modal blazordialog blazormodaldialog blazormodal razor razor-components razorcomponents</PackageTags >
1616 <VersionSuffix >$(VersionSuffix)</VersionSuffix >
17- <Version >2.0 .0</Version >
17+ <Version >2.1 .0</Version >
1818 <Version Condition =" '$(VersionSuffix)' != '' " >$(Version)-$(VersionSuffix)</Version >
1919 <Product >BlazorDialog</Product >
2020 </PropertyGroup >
Original file line number Diff line number Diff line change 4747 /// <summary >
4848 /// The input provided to the dialog when opening.
4949 /// </summary >
50- [Parameter ] public object Input { get ; set ; }
50+ [Parameter ] public object ? Input { get ; set ; }
5151
5252 /// <summary >
5353 /// An event that is triggered before the dialog appears.
220220 await Show <object >();
221221 }
222222
223- public async Task <TResult > Show <TResult >()
223+ public async Task <TResult ? > Show <TResult >()
224224 {
225225 this .Input = null ;
226- return (TResult )await ShowInternal ();
226+ var result = await ShowInternal ();
227+ return result == null ? default : (TResult )result ;
227228 }
228229
229230 public async Task Show (object input )
230231 {
231232 await this .Show <object >(input );
232233 }
233234
234- public async Task <TResult > Show <TResult >(object input )
235+ public async Task <TResult ? > Show <TResult >(object input )
235236 {
236237 this .Input = input ;
237- return (TResult )await ShowInternal ();
238+ var result = await ShowInternal ();
239+ return result == null ? default : (TResult )result ;
238240 }
239241
240- private async Task <object > ShowInternal ()
242+ private async Task <object ? > ShowInternal ()
241243 {
242244 if (OnBeforeShow .HasDelegate )
243245 {
Original file line number Diff line number Diff line change @@ -82,7 +82,12 @@ Make sure that there is a call to `app.UseStaticFiles();` in your server project
8282
8383## Release Notes
8484
85- <details open =" open " ><summary >2.0</summary >
85+ <details open =" open " ><summary >2.1</summary >
86+
87+ > - Minor fix for when returning null dialog results to non nullable result types.
88+ </details>
89+
90+ <details ><summary >2.0</summary >
8691
8792> - New feature: ShowComponentAsDialog. Check demo app for examples.
8893> - Upgraded target framework to 6.0
You can’t perform that action at this time.
0 commit comments