1
votes

I'm trying to set the scrollHeight value to '300px' in p-dropdown, When I serve the application no error is thrown but the scrollbar shows up at 200px only. Also unit test case for the same fails with 'setting getter only value scrollHeight'. I need to set the scroll height as my list will be populated dynamically. Any answer would be appreciated. Thanks. versions used angular - 4.1.2, primeng - 4.0.1

    `<p-dropdown 
                [options]="options"
                [scrollHeight]="scrollHeight"
     </p-dropdown>`

in component i have

scrollHeight: string = '300px'

1
The root cause for this issue was the version of ngPrime doesn't support the scrollHeight setting. updating it fixed the issue - MalliKharjuna Rao

1 Answers

1
votes

I've just tested this in plnkr, and it works fine. I would suggest trying it in plnkr as well to see if you can duplicate the problem. I have successfully used:

scrollHeight: string = '300px';

Use this as your base: New Issue Plnkr