Skip to content

Commit 6379a41

Browse files
committed
Fix Glossary page dropdown by replacing tuples with record class
RadzenDropDown uses reflection for TextProperty/ValueProperty which cannot access tuple elements (Item1/Item2). Use SelectOption record with proper named properties instead.
1 parent eee8bf3 commit 6379a41

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

cloud/src/LrmCloud.Web/Pages/Projects/Glossary.razor

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -226,11 +226,11 @@ else
226226

227227
private string _projectName = "";
228228

229-
private List<(string Value, string Text)> _scopeOptions = new()
229+
private List<SelectOption> _scopeOptions = new()
230230
{
231-
("all", "All"),
232-
("project", "Project Only"),
233-
("organization", "Organization Only")
231+
new("all", "All"),
232+
new("project", "Project Only"),
233+
new("organization", "Organization Only")
234234
};
235235

236236
private List<GlossaryTermDto> FilteredTerms => _glossary?.Terms
@@ -244,12 +244,12 @@ else
244244
t.Translations.ContainsKey(_languageFilter))
245245
.ToList() ?? new();
246246

247-
private List<(string Value, string Text)> GetLanguageOptions()
247+
private List<SelectOption> GetLanguageOptions()
248248
{
249-
var options = new List<(string Value, string Text)> { ("", "All Languages") };
249+
var options = new List<SelectOption> { new("", "All Languages") };
250250
if (_glossary != null)
251251
{
252-
options.AddRange(_glossary.Languages.Select(l => (l, l.ToUpperInvariant())));
252+
options.AddRange(_glossary.Languages.Select(l => new SelectOption(l, l.ToUpperInvariant())));
253253
}
254254
return options;
255255
}
@@ -489,4 +489,6 @@ else
489489
return text;
490490
return text[..maxLength] + "...";
491491
}
492+
493+
private record SelectOption(string Value, string Text);
492494
}

0 commit comments

Comments
 (0)