Skip to content

Commit

Permalink
Data is now public in JingetDynamicField.razor
Browse files Browse the repository at this point in the history
  • Loading branch information
vahid committed Jun 6, 2024
1 parent 05367b5 commit 59c52e6
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ else if (Attribute is JingetComboBox comboBox && comboBox.Searchable == false)
Variant="Variant.Outlined"
ValueChanged="OnItemSelected">
<MudSelectItem Disabled=true Value="0.ToString()">@comboBox.DefaultText</MudSelectItem>
@foreach (DropDownItemModel item in _data)
@foreach (DropDownItemModel item in Data)
{
<MudSelectItem Value="@item.Value?.ToString()">@item.Text</MudSelectItem>
}
Expand All @@ -62,7 +62,7 @@ else if (Attribute is JingetComboBox searchableComboBox && searchableComboBox.Se
{
<select id="@Id" onchange=@OnChange class="@Attribute.CssClass">
<option value="">@searchableComboBox.DefaultText</option>
@foreach (var item in _data)
@foreach (var item in Data)
{
bool selected = item.Value != null && Value != null && item.Value.ToString().Equals(Value.ToString());
if (selected)
Expand Down Expand Up @@ -174,7 +174,7 @@ else
[Parameter] public EventCallback<JingetDynamicField> DynamicFieldAdded { get; set; }

[JsonProperty]
List<DropDownItemModel> _data = [];
public List<DropDownItemModel> Data = [];

bool connected = false;
private DotNetObjectReference<JingetDynamicField>? dotNetObjRef;
Expand All @@ -190,7 +190,7 @@ else
dotNetObjRef = DotNetObjectReference.Create(this);
if (Attribute is JingetComboBox comboBox)
{
_data = await GetData();
Data = await GetData();
if (comboBox.Searchable)
{
connected = true;
Expand Down

0 comments on commit 59c52e6

Please sign in to comment.