javascriptcssreactjsscrollbarantd

React AntD Select style scrollbar


I am trying to access the scrollbar styling in the antD Select component. I have found where to style the scrollbar but it is not functional. Meaning, it shows up when I remove the diplay: none from the style and change the color, but it doesn't scroll. Am I doing something wrong. In order to change the style I am doing something like this... enter image description here

enter image description here

Also, I found a way to add a functional scrollbar using this code...

.ant-select-dropdown{
    overflow: auto;
}

enter image description here

But this does not allow me to style the dropdown scrollbar. Instead I have to style it using the webkit which styles this everywhere and I cannot get it to fit exactly in the dropwdown. I was hoping to use the antD one, as it looks nicer, but it doesn't function for some reason. Any idea how to get this to work?


Solution

  • I found the solution here by setting this on the select element. enter image description here