Skip to content

Commit

Permalink
[#227] Fix deprecated InputGroup Append and replace FormControl to Fo…
Browse files Browse the repository at this point in the history
…rmSelect
  • Loading branch information
palagdan committed Oct 7, 2024
1 parent fcaaf22 commit 43fa980
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/components/HorizontalInput.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use strict";

import React, { forwardRef } from "react";
import { Col, FormCheck, FormControl, FormGroup, FormLabel, FormText, InputGroup } from "react-bootstrap";
import { Col, FormCheck, FormControl, FormGroup, FormLabel, FormSelect, FormText, InputGroup } from "react-bootstrap";
import PropTypes from "prop-types";
import Row from "react-bootstrap/Row";
import TypeaheadAnswer from "./record/TypeaheadAnswer";
Expand Down Expand Up @@ -67,9 +67,9 @@ const HorizontalInput = forwardRef(function HorizontalInputWithRef(props, ref) {
<FormGroup as={Row} className="mb-3">
{renderLabel()}
<Col lg={props.inputWidth}>
<FormControl as="select" ref={ref} {...getInputProps()}>
<FormSelect ref={ref} {...getInputProps()}>
{props.children}
</FormControl>
</FormSelect>
{props.validation && <FormControl.Feedback />}
{renderHelp()}
</Col>
Expand Down Expand Up @@ -127,9 +127,7 @@ const HorizontalInput = forwardRef(function HorizontalInputWithRef(props, ref) {
{props.iconRight ? (
<InputGroup>
{formControl}
<InputGroup.Append>
<InputGroup.Text className="py-0">{props.iconRight}</InputGroup.Text>
</InputGroup.Append>
<InputGroup.Text className="py-0">{props.iconRight}</InputGroup.Text>
</InputGroup>
) : (
<div>
Expand Down

0 comments on commit 43fa980

Please sign in to comment.