加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

reactjs – react-bootstrap中的controlId是什么

发布时间:2020-12-15 20:14:11 所属栏目:百科 来源:网络整理
导读:我刚刚经历了 React-bootstrap form什么是controlId的使用它是否与我们在遗留形式中使用的名称类似? form FormGroup controlId="formBasicText" ---------------------- what is the use? validationState={this.getValidationState()} ControlLabelWorking
我刚刚经历了 React-bootstrap form什么是controlId的使用它是否与我们在遗留形式中使用的名称类似?

<form>
    <FormGroup
      controlId="formBasicText" ---------------------->> what is the use?
      validationState={this.getValidationState()}
    >
      <ControlLabel>Working example with validation</ControlLabel>
      <FormControl
        type="text"
        value={this.state.value}
        placeholder="Enter text"
        onChange={this.handleChange}
      />
      <FormControl.Feedback />
      <HelpBlock>Validation is based on string length.</HelpBlock>
    </FormGroup>
  </form>

解决方法

正如 DOCS所说:

Sets id on <FormControl> and htmlFor on <FormGroup.Label>.

基本上它是输入的id和属性的标签.

enter image description here

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读