React选择粘性选项



如何在react-select stick中创建一个选项。(即:就像固定的位置一样,即使我们滚动下拉菜单中的选项,它也会保持在顶部(

是否尝试在react select上添加css?

import React from 'react'
import Select from 'react-select'
const options = [
{ value: 'chocolate', label: 'Chocolate' },
{ value: 'strawberry', label: 'Strawberry' },
{ value: 'vanilla', label: 'Vanilla' }
]
const MyComponent = () => (
<Select options={options} style={{position: 'fixed !important'}} />
)

谨致问候,基里安。

最新更新