cancel
Showing results for 
Search instead for 
Did you mean: 

SAC Story - align tables to move dynamically

Bobbo
Explorer
0 Kudos
127

Hi all, 

I have panel with filters on the top of the page which can expand/collapse. Below it I have table which I want to move up once the filter panel is collapsed (to be aligned to the bottom side of this filter panel) so it won't have blank space between both once it is collapsed.

Is it possible somehow to do that?

 

Thank you!

 

 

Bobbo
Explorer
0 Kudos
Thank you, I will try that. Should I change the type of the code as void, boolean in order to work? Sorry for the simple questions but I am beginner for this and don't have a lot of experience.
View Entire Topic
Savio_Dmello
Active Participant
0 Kudos

Make sure the page is using responsive layout instead of canvas and then you can use scripted logic that can adjust the Table Position dynamically when the filter panel collapses.

Sample code

if (isPanelCollapsed) {
Table_1.setTop(Panel_1.getTop());
} else {
Table_1.setTop(Panel_1.getTop() + Panel_1.getHeight()); }

Panel_1  filter panel object.
Table_1 table object that needs to move.
isVisible()  returns whether the filter panel is currently visible or collapsed.
setTop()  moves the table up or down based on the top position of the filter panel.

If you also want the table to automatically adjust ithe size when panel is collapsed, you can modify the setHeight() or setWidth() methods to resize table.

Bobbo
Explorer
0 Kudos
Thank you, I will try that. Should I change the type of the code as void, boolean in order to work properly?