Lens Selector should persist on Lens view #6860
Unanswered
matthewjumpsoffbuildings
asked this question in
Ideas & Feature Requests
Replies: 0 comments
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.
-
Why is the LensSelector component not showing on specific Lens views?
If you have a lot of Lenses for a particular resource, its may not be reasonable to have a main menu with a huge list of Lenses. So the LensSelector component that shows up on the Resource Index view is the usual way to select a Lens to view from a dropdown.
But once you actually get to a particular Lens, the LensSelector component no longer shows in the ResourceTableToolbar. So you have to do 2 clicks and page loads to view a different Lens, eg go back to the Index view first, then select the new Lens from the LensSelector.
What is the logic behind this? When viewing a Lens, you have the parent resource in context still, its in the route eg
/resources/RESOURCE_NAME/lens/LENS_NAME
, so getting the available Lenses to display would be the same approach as in Index view.The Index view has a
getLenses()
method which loads the Lenses for that Resource, but the Lens view does not define that method, so no:lenses="lenses"
is passed to the ResourceTableToolbarBeta Was this translation helpful? Give feedback.
All reactions