Replies: 1 comment
-
|
Hey @mattngu01 I'm not sure I'm fully understanding the issue here. You are looking to be able to pre-define form field values upon form creation, right? It looks like your test above is testing that Huh is storing the values to the right variables. I don't think that kind of test is needed for a third party project. If anything that behaviour should be tested in the Huh library itself. That said, it's totally possible that I'm misunderstanding the problem here. I'd be happy to help however possible, so please let me know if this is helpful or if I'm missing something :) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is your feature request related to a problem? Please describe.
I am currently unit testing my TUI application using bubbletea. I found it unintuitive that when setting a field's value, you cannot immediately retrieve the results after creating a form.
Describe the solution you'd like
A clear and concise description of what you want to happen.
Within
NewForm(), I would like to set the results to any existing values for fields within it.Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
I can always call
NextField()in the Form setup for my unit tests, but I figure this behavior might confuse some users in the future.Additional context
I just want to make sure if there is a specific choice for forms to work this way. If it is not intended, I can take a stab at it. I'm learning Go right now, and I think it would be a good opportunity.
Beta Was this translation helpful? Give feedback.
All reactions