Skip to content

Commit

Permalink
Merge pull request #490 from Soar360/patch-2
Browse files Browse the repository at this point in the history
Fix #478
  • Loading branch information
rabbitism authored Nov 19, 2024
2 parents b58fc7f + 7a32a67 commit cd3d425
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Ursa/Controls/TagInput/TagInput.cs
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,6 @@ protected override void OnLoaded(RoutedEventArgs e)
_presenter = _textBox.GetTemplateChildren().OfType<TextPresenter>().FirstOrDefault();
_presenter?.GetObservable(TextPresenter.PreeditTextProperty).Subscribe(_ => CheckEmpty());
_textBox.GetObservable(TextBox.TextProperty).Subscribe(_ => CheckEmpty());
if (Tags is INotifyCollectionChanged incc)
incc.GetWeakCollectionChangedObservable().Subscribe(_ => CheckEmpty());
}

private void OnInputThemePropertyChanged(AvaloniaPropertyChangedEventArgs args)
Expand Down Expand Up @@ -269,6 +267,8 @@ private void OnCollectionChanged(object? sender, NotifyCollectionChangedEventArg
Items.Add(_textBox);
InvalidateVisual();
}

CheckEmpty();
}

private void OnTextBoxKeyDown(object? sender, KeyEventArgs args)
Expand Down Expand Up @@ -331,4 +331,4 @@ public void Close(object o)
Tags.RemoveAt(index.Value);
}
}
}
}

0 comments on commit cd3d425

Please sign in to comment.