Fullscreen object-table
Utilizing all the available screen real estate becomes important for some use cases with object-table
. It is possible to put a table into fullscreen mode, allowing it maximize available screen space.
How to implement
Below is a typical pattern for implementing fullscreen capability:
Note: the id="1"
attribute is important here as it allows the component.objectTable
to target very specific tables.
Note: In the above example, we add the full-screen button to the <button-group>
inside the table so that when the table goes full-screen we are able to exit full-screen again since the button is part of the table.
Note: When scrollable tables (mode="scroll"
) go into full-screen mode, they are automatically modified to expand to the full height of the available viewport and thus the limit=""
attribute will no longer have an effect on the height.
Tips and tricks
Use fullscreen
to provide a richer editing experience
fullscreen
to provide a richer editing experienceIn this example, we can use the fullscreen variable to show and hide additional buttons that can enrich working with editable tables in a more focused manner. These kinds of workflows are often seen with PDF viewers or image editors embedded in applications.
Use fullscreen to change table modes
When full-screen mode activates, use a function to dynamically change the mode of the table to scroll
. This allows a table to minimize space when idle, but to maximize space when fullscreen is enabled.
Last updated