Skip to content

Commit

Permalink
#56 Final solution
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal Kopecký committed Dec 21, 2021
1 parent c89b913 commit 7b3c990
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/bootstrap/src/controls/input.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { bound } from "@frui.ts/helpers";
import * as React from "react";
import { Form, FormControl } from "react-bootstrap";
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 & React.PropsWithRef<FormControl> & TOtherProps
InputProps & React.InputHTMLAttributes<FormControlElement> & FormControlProps & TOtherProps
> {
@bound
protected renderInner() {
Expand Down

0 comments on commit 7b3c990

Please sign in to comment.