File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed
src/DotNetElements.Web.Blazor Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change 3030 ValueChanged = EventCallback .Factory .Create <string >(this , OnValueChanged );
3131 }
3232
33- protected override void OnParametersSet ( )
33+ public override async Task SetParametersAsync ( ParameterView parameters )
3434 {
35- Console .WriteLine ($" OnParameterSet SearchString: {SearchString }, Searchid: {SearchId }" ); // todo
35+ string ? oldSearchString = SearchString ;
36+ Guid ? oldSearchId = SearchId ;
3637
37- if (SearchString is null && SearchId is null )
38- Value = " " ;
38+ await base .SetParametersAsync (parameters );
3939
40- Value = SearchString ?? " " ;
40+ if (SearchString == oldSearchString && SearchId == oldSearchId )
41+ return ;
42+
43+ if (SearchId is not null )
44+ SearchString = SearchId .ToString ();
45+
46+ await SetTextAsync (SearchString ?? " " );
4147 }
4248
43- private void OnValueChanged (string value )
49+ private void OnValueChanged (string ? value )
4450 {
45- Console .WriteLine ($" OnValueChanged: {value }" ); // todo
46-
4751 if (string .IsNullOrEmpty (value ))
4852 {
4953 SearchString = null ;
You can’t perform that action at this time.
0 commit comments