mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 13:50:31 +00:00
chrone: sperate client and server to different repos.
This commit is contained in:
20
src/components/DataTableCells/DivFieldCell.js
Normal file
20
src/components/DataTableCells/DivFieldCell.js
Normal file
@@ -0,0 +1,20 @@
|
||||
import React, { useState, useEffect } from 'react';
|
||||
|
||||
export const DivFieldCell = ({ cell: { value: initialValue } }) => {
|
||||
const [value, setValue] = useState(initialValue);
|
||||
|
||||
useEffect(() => {
|
||||
setValue(initialValue);
|
||||
}, [initialValue]);
|
||||
|
||||
return <div>${value}</div>;
|
||||
};
|
||||
export const EmptyDiv = ({ cell: { value: initialValue } }) => {
|
||||
const [value, setValue] = useState(initialValue);
|
||||
|
||||
useEffect(() => {
|
||||
setValue(initialValue);
|
||||
}, [initialValue]);
|
||||
|
||||
return <div>{value}</div>;
|
||||
};
|
||||
Reference in New Issue
Block a user