tempestphp / tempest-framework

The PHP framework that gets out of your way 🌊
https://tempestphp.com
MIT License
813 stars 55 forks source link

fix(console): support `default` parameter on textbox component #518

Closed innocenzi closed 1 day ago

innocenzi commented 1 day ago

This pull request adds support for the default parameter of Console#ask, which wasn't passed down nor taken into account in TextBoxComponent.

Note: my approach was the easiest I could think of—reusing the existing methods instead of adding a new cursor manipulation, at the cost of introducing a loop, which I believe is fast enough to not care about it.

brendt commented 1 day ago

Yeah, looks good