Skip to content

Commit

Permalink
pass default value in ref
Browse files Browse the repository at this point in the history
  • Loading branch information
k-rajat19 committed Dec 31, 2024
1 parent 77e599f commit 6b5fd3d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const dateColumnType = {

function GridEditDateCell({ id, field, value, colDef, hasFocus }) {
const apiRef = useGridApiContext();
const inputRef = React.useRef();
const inputRef = React.useRef(null);
const Component = colDef.type === 'dateTime' ? DateTimePicker : DatePicker;

const handleChange = (newValue) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function GridEditDateCell({
hasFocus,
}: GridRenderEditCellParams<any, Date | null, string>) {
const apiRef = useGridApiContext();
const inputRef = React.useRef<HTMLInputElement>();
const inputRef = React.useRef<HTMLInputElement>(null);
const Component = colDef.type === 'dateTime' ? DateTimePicker : DatePicker;

const handleChange = (newValue: unknown) => {
Expand Down

0 comments on commit 6b5fd3d

Please sign in to comment.