Skip to content

Commit

Permalink
Should not deselect the item from the selections after focus out.
Browse files Browse the repository at this point in the history
Because click the item in the row might cause the focus-out event in the object field textbox.
  • Loading branch information
andy840119 committed Sep 11, 2022
1 parent 3b6feb1 commit 9c0d30c
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,6 @@ protected void TriggerSelect()
SelectedItems.Add(item);
}

protected void TriggerUnselect()
{
SelectedItems.Remove(item);
}

protected abstract bool GetFieldValue(T item);

protected abstract void ApplyValue(T item, bool value);
Expand All @@ -73,13 +68,7 @@ protected void TriggerUnselect()
Selected = selected =>
{
if (selected)
{
TriggerSelect();
}
else
{
TriggerUnselect();
}
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,6 @@ protected void TriggerSelect()
SelectedItems.Add(item);
}

protected void TriggerUnselect()
{
SelectedItems.Remove(item);
}

protected abstract string GetFieldValue(T item);

protected abstract void ApplyValue(T item, string value);
Expand All @@ -92,13 +87,7 @@ protected void TriggerUnselect()
Selected = selected =>
{
if (selected)
{
TriggerSelect();
}
else
{
TriggerUnselect();
}
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,6 @@ protected LabelledTextTagTextBox(Lyric lyric, T textTag)
// trigger selected if hover on delete button.
TriggerSelect();
}
else
{
// do not clear current selected if typing.
if (Component.HasFocus)
return;

TriggerUnselect();
}
}
}
});
Expand All @@ -95,13 +87,7 @@ protected LabelledTextTagTextBox(Lyric lyric, T textTag)
Selected = selected =>
{
if (selected)
{
TriggerSelect();
}
else
{
TriggerUnselect();
}
},
Action = (indexType, action) =>
{
Expand Down

0 comments on commit 9c0d30c

Please sign in to comment.