MalliKharjuna Rao
MalliKharjuna Rao

Reputation: 549

setting scrollHeight for p-dropdown throws an error

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'

Upvotes: 2

Views: 2817

Answers (1)

BillF
BillF

Reputation: 864

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

Upvotes: 2

Related Questions