Skip to content

Commit

Permalink
Merge pull request #59 from kopecmi8/feature/56
Browse files Browse the repository at this point in the history
#56 Add prop types for input
  • Loading branch information
gius authored Dec 21, 2021
2 parents f412ca8 + 7b3c990 commit a3f7517
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/bootstrap/src/controls/input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import * as React from "react";
import { Form, FormControlProps } from "react-bootstrap";
import { ValidationControlBase } from "./validationControlBase";

type FormControlElement = HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;

export interface InputProps {
onBlur?: (e: React.FormEvent<any>) => void;
onFocus?: (e: React.FormEvent<any>) => void;
Expand All @@ -25,7 +27,7 @@ export function formatValueForControl(value: any) {

export class Input<TTarget, TOtherProps = unknown> extends ValidationControlBase<
TTarget,
InputProps & FormControlProps & TOtherProps
InputProps & React.InputHTMLAttributes<FormControlElement> & FormControlProps & TOtherProps
> {
@bound
protected renderInner() {
Expand Down

0 comments on commit a3f7517

Please sign in to comment.