diff --git a/src/Ursa/Controls/TagInput/TagInput.cs b/src/Ursa/Controls/TagInput/TagInput.cs index 920f01c..30773d4 100644 --- a/src/Ursa/Controls/TagInput/TagInput.cs +++ b/src/Ursa/Controls/TagInput/TagInput.cs @@ -165,10 +165,17 @@ public class TagInput : TemplatedControl { var newTags = args.GetNewValue>(); var oldTags = args.GetOldValue>(); - for (int i = 0; i < Items.Count - 1; i++) + + if (Items is AvaloniaList avaloniaList) { - Items.RemoveAt(Items.Count - 1); + avaloniaList.RemoveRange(0, avaloniaList.Count - 1); } + else if (Items.Count != 0) + { + Items.Clear(); + Items.Add(_textBox); + } + if (newTags != null) { for (int i = 0; i < newTags.Count; i++)