File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
src/BootstrapBlazor/Components/Display Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -127,16 +127,16 @@ private async Task<string> FormatText([DisallowNull] TValue value)
127127
128128 private async Task < string > FormatValueString ( )
129129 {
130- string ? ret = null ;
131-
132- // 检查 数据源
133- var valueString = Value ? . ToString ( ) ;
134- var lookup = await GetLookup ( ) ;
135- if ( lookup != null )
130+ string ? ret = Value ? . ToString ( ) ;
131+ if ( ! string . IsNullOrEmpty ( ret ) )
136132 {
137- ret = lookup . FirstOrDefault ( i => i . Value . Equals ( valueString , LookupStringComparison ) ) ? . Text ;
133+ var lookup = await GetLookup ( ) ;
134+ if ( lookup != null )
135+ {
136+ ret = lookup . FirstOrDefault ( i => i . Value . Equals ( ret , LookupStringComparison ) ) ? . Text ;
137+ }
138138 }
139- return ret ?? valueString ?? string . Empty ;
139+ return ret ?? string . Empty ;
140140 }
141141
142142 private Func < TValue , string > ? _arrayConvertoString ;
You can’t perform that action at this time.
0 commit comments