【问题标题】:React Bootstrap select option not showingReact Bootstrap 选择选项未显示
【发布时间】:2021-07-14 15:08:12
【问题描述】:

我无法让我的职业字段作为选择选项。我错过了什么?

import { Row, Col, Form } from 'react-bootstrap';
import FloatingLabel from "react-bootstrap-floating-label";

<Row className="g-2 mb-5">
                    <Col md style={{marginRight: "50px"}}>
                        <FloatingLabel controlId="floatingInputGrid" label="Name">
                        <Form.Control type="text" placeholder="Name" />
                        </FloatingLabel>
                    </Col>
                    <Col md>
                        <FloatingLabel controlId="floatingSelectGrid" label="Occupation">
                            <Form.Select aria-label="Select">
                                <option>Open this select menu</option>
                                <option value="1">One</option>
                                <option value="2">Two</option>
                                <option value="3">Three</option>
                            </Form.Select>
                        </FloatingLabel>
                    </Col>
</Row>

【问题讨论】:

  • 请自带一个可以工作的sn-p,如果你有一个sn-p可以清楚地显示你的问题,它会比没有sn-p更快地解决你的问题,例如,你可以从代码沙箱创建一个 sn-p

标签: reactjs forms react-bootstrap


【解决方案1】:

react-bootstrap-floating-label 不为 Form.Control 等 prop 子项提供任何支持/功能。考虑提交功能请求问题

【讨论】:

    猜你喜欢
    • 2020-06-30
    • 2019-01-29
    • 2019-02-10
    • 1970-01-01
    • 2014-09-20
    • 2022-01-10
    • 2021-07-15
    • 2021-11-02
    • 1970-01-01
    相关资源
    最近更新 更多