Skip to content

Conversation

@ardnew
Copy link

@ardnew ardnew commented Aug 28, 2024

This adds support for the so-called "Functional Options" pattern to configure menu.Model.

This pattern makes it much easier to add optional configurations without breaking any existing code or external interfaces.

In particular, a handful of Option functions have been added for more control over the embedded list.Model.

@ardnew
Copy link
Author

ardnew commented Sep 2, 2024

This PR adds support to menu.Model for the following features by providing indirect access to the underlying list.Model (from package github.com/charmbracelet/bubbles/list):

These options are intended to be used as lambda functions/closures passed as arguments with the variable-length parameter list of the package's primary constructor New(string, []Choice, *Choice, ...Option) Model

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant