mirror of
https://github.com/rowyio/rowy.git
synced 2025-12-29 00:16:39 +01:00
cleanup prop types
This commit is contained in:
@@ -5,7 +5,7 @@ import { Checkbox } from "@material-ui/core";
|
||||
// TODO: Create an interface for props
|
||||
interface Props {
|
||||
value: boolean | null;
|
||||
row: any;
|
||||
row: { ref: firebase.firestore.DocumentReference; id: string };
|
||||
onSubmit: Function;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
// TODO: Create an interface for props
|
||||
interface Props {
|
||||
value: firebase.firestore.Timestamp | null;
|
||||
row: any;
|
||||
row: { ref: firebase.firestore.DocumentReference; id: string };
|
||||
onSubmit: Function;
|
||||
fieldType: FieldType;
|
||||
}
|
||||
|
||||
@@ -2,19 +2,17 @@ import React, { useCallback, useState } from "react";
|
||||
import { useDropzone } from "react-dropzone";
|
||||
import useUploader from "../../hooks/useFiretable/useUploader";
|
||||
|
||||
import { FieldType } from '.';
|
||||
import { FieldType } from ".";
|
||||
// TODO: indicate state completion / error
|
||||
// TODO: Create an interface for props
|
||||
|
||||
|
||||
interface Props {
|
||||
value: any;
|
||||
row: any;
|
||||
row: { ref: firebase.firestore.DocumentReference; id: string };
|
||||
onSubmit: Function;
|
||||
fieldType: FieldType;
|
||||
}
|
||||
|
||||
|
||||
const Image = (props: any) => {
|
||||
const { columnData, cellData, cellActions, rowData, rowIndex } = props;
|
||||
const [uploaderState, upload] = useUploader();
|
||||
|
||||
@@ -4,7 +4,7 @@ import { TextField } from "@material-ui/core";
|
||||
|
||||
// TODO: Create an interface for props
|
||||
const Number = (props: any) => {
|
||||
const { value, cellActions } = props;
|
||||
const { value } = props;
|
||||
return (
|
||||
<TextField
|
||||
autoFocus
|
||||
|
||||
@@ -9,12 +9,13 @@ import IconButton from "@material-ui/core/IconButton";
|
||||
import Button from "@material-ui/core/Button";
|
||||
import EditIcon from "@material-ui/icons/Edit";
|
||||
import HeaderPopper from "./HeaderPopper";
|
||||
import { FieldType } from "../Fields";
|
||||
import { FieldType, getFieldIcon } from "../Fields";
|
||||
|
||||
import Date from "../Fields/Date";
|
||||
import Rating from "../Fields/Rating";
|
||||
import CheckBox from "../Fields/CheckBox";
|
||||
import UrlLink from "../Fields/UrlLink";
|
||||
|
||||
const useStyles = makeStyles(Theme =>
|
||||
createStyles({
|
||||
typography: {
|
||||
@@ -110,7 +111,7 @@ function Table(props: any) {
|
||||
fromRowData.ref.update(updated);
|
||||
};
|
||||
const onCellSelected = (args: any) => {
|
||||
handleCloseHeader();
|
||||
// handleCloseHeader();
|
||||
console.log(args);
|
||||
};
|
||||
const headerRenderer = (props: any) => {
|
||||
@@ -129,6 +130,7 @@ function Table(props: any) {
|
||||
onClick={handleClick(props)}
|
||||
aria-label="edit"
|
||||
>
|
||||
{getFieldIcon(props.column.type)}
|
||||
{props.column.name} <EditIcon />
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user