Commit f5b64270 authored by chenshouchao's avatar chenshouchao

nothing

parent 82e2d8ba
...@@ -23,6 +23,7 @@ const CardTable = (props: ICardTableProps) => { ...@@ -23,6 +23,7 @@ const CardTable = (props: ICardTableProps) => {
} = props; } = props;
const [numberOfColumns, setNumberOfColumns] = useState(3); const [numberOfColumns, setNumberOfColumns] = useState(3);
const tableBoxRef: any = useRef(null);
const getNumberOfColumns = useCallback(() => { const getNumberOfColumns = useCallback(() => {
if (itemMinWidth) { if (itemMinWidth) {
...@@ -41,8 +42,6 @@ const CardTable = (props: ICardTableProps) => { ...@@ -41,8 +42,6 @@ const CardTable = (props: ICardTableProps) => {
getNumberOfColumns(); getNumberOfColumns();
}, [getNumberOfColumns]); }, [getNumberOfColumns]);
const tableBoxRef: any = useRef(null);
const boxWidth = useMemo(() => { const boxWidth = useMemo(() => {
return `${100 / numberOfColumns}%`; return `${100 / numberOfColumns}%`;
}, [numberOfColumns]); }, [numberOfColumns]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment