dotnet / Comet

Comet is an MVU UIToolkit written in C#
MIT License
1.64k stars 116 forks source link

Text doesn't update properly #251

Closed ziaulhasanhamim closed 2 years ago

ziaulhasanhamim commented 2 years ago
new VStack()
{
    new TextField(state.FirstName, "First Name"),
    new TextField(state.LastName, "Last Name"),
    new Text(() => $"{state.FirstName} {state.LastName}")
}

By default FirstName and LastName is empty. When They are changed via TextField only one letter Shows up in new Text(() => $"{state.FirstName} {state.LastName}"). I'm very new to comet. Also I can't find docs for TextField. So there might be something i'm doing wrong there

Clancey commented 2 years ago

My guess is a laytout bug. Try new Text(() => $"{state.FirstName} {state.LastName}").FillHorizontal()

ziaulhasanhamim commented 2 years ago

yeah working that way. So is it a bug that will be fixed in the future? Or this is the way to do it?

Clancey commented 2 years ago

Will be fixed in a future release!