Skip to content

Commit

Permalink
[DOCS] Fix two instances of incorrect 2nd parseFloat parameter.
Browse files Browse the repository at this point in the history
  • Loading branch information
dannya committed Dec 13, 2023
1 parent a595ee0 commit 537a89a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions src-docs/src/views/datagrid/basics/datagrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,7 @@ const RenderCellValue = ({ rowIndex, columnId, setCellProps }) => {
useEffect(() => {
if (columnId === 'amount') {
if (data.hasOwnProperty(rowIndex)) {
const numeric = parseFloat(
data[rowIndex][columnId].match(/\d+\.\d+/)[0],
10
);
const numeric = parseFloat(data[rowIndex][columnId].match(/\d+\.\d+/)[0]);
setCellProps({
style: {
backgroundColor: `rgba(0, 255, 0, ${numeric * 0.0002})`,
Expand Down
5 changes: 1 addition & 4 deletions src-docs/src/views/datagrid/schema_columns/footer_row.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@ const RenderCellValue = ({ rowIndex, columnId, setCellProps }) => {
useEffect(() => {
if (columnId === 'amount') {
if (raw_data.hasOwnProperty(rowIndex)) {
const numeric = parseFloat(
raw_data[rowIndex][columnId].match(/\d+\.\d+/)[0],
10
);
const numeric = parseFloat(raw_data[rowIndex][columnId].match(/\d+\.\d+/)[0]);
setCellProps({
style: {
backgroundColor: `rgba(0, 255, 0, ${numeric * 0.0002})`,
Expand Down

0 comments on commit 537a89a

Please sign in to comment.