Skip to content

Commit

Permalink
🐛 fix(TextField): supports for watching Label (#361)
Browse files Browse the repository at this point in the history
  • Loading branch information
capdiem committed Mar 27, 2023
1 parent e5d8452 commit 79c3e87
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,12 @@ public void SetValue<TValue>(TValue value, string name, bool disableIListAlwaysN
return Watch(name, (_, _) => changeCallback.Invoke(), immediate, @override, defaultValue);
}

public PropertyWatcher Watch<TValue>(string name, Func<Task> changeCallback, bool immediate = false, bool @override = false,
TValue? defaultValue = default)
{
return Watch(name, (_, _) => changeCallback.Invoke(), immediate, @override, defaultValue);
}

public PropertyWatcher Watch<TValue>(string name, Action<TValue?> changeCallback, bool immediate = false, bool @override = false,
TValue? defaultValue = default)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ public partial class BInput<TValue> : BDomComponentBase, IInput<TValue>
public RenderFragment ChildContent { get; set; }

[Parameter]
public string Label { get; set; }
public string Label
{
get => GetValue<string>();
set => SetValue(value);
}

[Parameter]
public virtual string PrependIcon { get; set; }
Expand Down

0 comments on commit 79c3e87

Please sign in to comment.