Skip to content

Allow transitive data context while transitioning to another view #48

@devnatan

Description

@devnatan

When transitioning to another view using ViewContext's open fn, user must can choose if it will transfer the data from the current view to the next view

Example:

final class A extends View {}
final class B extends View {}

Opens A view with some data

open(player, A.class, ImmutableMap.of("donnut", "chocolate"));

Inside A handler

Current Behavior

B view opens with no data

...onClick(click -> click.open(B.class));
New Behavior

B view opens with no data but user can transfer data from A to B

...onClick(click -> click.open(B.class, true /* inherit context data */));
Workaround while this is not implemented
...onClick(click -> click.open(B.class, click.getData()));

Metadata

Metadata

Assignees

Labels

featureNew feature or enchancement

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions