Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Displaying a List of Lists - #611

Open
Userlinger opened this issue Aug 3, 2024 · 2 comments
Open

Displaying a List of Lists - #611

Userlinger opened this issue Aug 3, 2024 · 2 comments

Comments

@Userlinger
Copy link

Hi,
A desktop app i want to create needs to display an outer list that itself contains sublists, that contain items. I need to create and delete sublists at runtime, and also listen to events that are emitted from the items.
I am wondering if implementing such a thing is conceptually possible with Elmish.WPF as the bindings() function is intend to run once.
I have fallen in love with f# recently, and really would like to implement that project in f#.
Thanks!

@TysonMN
Copy link
Member

TysonMN commented Aug 3, 2024

Yes, that is possible. See the samples.

@marner2
Copy link
Collaborator

marner2 commented Oct 1, 2024

as the bindings() function is intend to run once.

@Userlinger This is only true of the top-level object. Elmish.WPF will run the subModel bindings for each object creation.

Also from a design perspective, it might be easier to make a list of objects that each contain lists. This shouldn't affect the underlying design, though. And you can probably keep your F# model representation as a list of lists.

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

No branches or pull requests

3 participants