I get into a morass whenever I implement a TextField where the input is parsed to some other value type (e.g. LocalDate). Like, do I hoist the parsed value and hide the text input as internal to the composable adding the TextField?
Ah, I think the solution is to make a
DateFieldValue
to wrap both
TextFieldValue
and the parsed output
b
babel
04/22/2022, 11:38 PM
maybe take a peek at
VisualTransformation
?
t
tad
04/22/2022, 11:39 PM
Right, that's for displaying the formatted value; I was running into dealing with multiple sources of truth for the input
but wrapping it (like what TextFieldValue does) solves that problem pretty nicely