Empty space when widget is getting hidden on Service portal

dheeraaj
Giga Expert

Hi Experts,

Need to clear off the empty space when a widget becomes hidden due to user criteria. Please find the attached image.

I want to know if there is any way the layout gets auto arranged after the widget gets hidden. 

Currently it is becoming blank and not looking good.

Help is appreciated.

Regards,

Dheeraaj

9 REPLIES 9

dheeraaj
Giga Expert

Can somebody please help me with this one.

I need to clear off the empty space on the portal page when a widget becomes hidden due to user criteria.

 

Help is appreciated.

 

Regards,

Dheeraaj

Bharath69
Tera Expert

Hi dheeraaj,

 

I have the same requirement. Did you find the solution?

 

Thanks,

Bharath

Hi Bharath,

If you see the attached image in the question , I was having issues with empty blocks. I was able to resolve the issue (empty blocks) with coding. But the space issue was not resolved. 

However I did realize that I could tackle that issue using ng-style (use it on your conditions) 

Basically I was using @media (max-width ) and applying it on whole conditions. If you can manipulate the above css depending on your conditions , you should be able to achieve it. 

 

Regards,

Dheeraj

Bharath69
Tera Expert

dheeraaj,

Can you please elaborate on how you used @media , I have a container with 4 widgets and I am trying to hide one of the widget using an user criteria, which is resulting in empty space when it is hidden.

I appreciate your help.

Thanks,

Bharath

Hi Bharath, 

Here is the sample code 

@media (max-width: 768px) {
.myhr-test2 {
margin-top: 32px;
padding-top: 25px;
width: 215px;
height: 300px;
background-color: #ffffff;
font-size: 18px;
}

 

If you want to adjust the space, I would advise you to use the ng-class and dynamically set the @media to display the tiles according to your conditions.

 

Regards,

Dheeraj