How to use Scroll container for my own pluggable widget

0
Hi,  I have my own pluggable widget which produce list view kind of result. Currently I am scrolling down entire page to see all result.  I want to use scroll behavior for my  widget so that instead of entire page only what is visible in list should be scrolled down. How shall I proceed to apply scroll behavior to only my widget part.? I tried to use Scroll Container but it didn’t helped me.   Thanks in Advance.
asked
2 answers
0

hi Sushil,
you can use the css code to achieve this
.classname{

height:50vh;
overflow-y:scroll;
}

place the class name in your custom widget 
hope it helps!!


 

answered
0

Hi Sushil,

You could set a css class on the html element you return from your render, and add maxHeight and overflow to your css class

let myDiv = document.createElement('DIV');
myDiv.className = 'myCssClass';

render() {
   return ({myDiv});
}


.myCssClass {
   max-height: 500px;
   overflow: scroll;
}

 

answered