Skip to content

Commit

Permalink
remove console.logs
Browse files Browse the repository at this point in the history
  • Loading branch information
garrylachman committed Jun 10, 2021
1 parent 8162ea2 commit 5fd43cb
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-awesome-table",
"version": "1.0.3",
"version": "1.0.4",
"description": "React-Native Simple Data Tables",
"homepage": "https://github.com/garrylachman/react-native-awesome-table",
"keywords": ["react", "react-native", "react tables", "react-native tables", "data tables", "table"],
Expand Down
2 changes: 0 additions & 2 deletions src/components/Row.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ const Row = (props: RowProps) => {
style = {}
} = props;

console.log(children)

return (
<TouchableOpacity style={[styles.container, style]}>
{children}
Expand Down
4 changes: 0 additions & 4 deletions src/components/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,10 @@ const Table = (props: TableProps) => {
}
// Have data, adjust by title/data (first row)
const firstRow = data[0];
console.log("first Row", firstRow);
console.log("columns", columns)
totalLength = columns
.map(c => Math.max(c.title.length, `${firstRow[c.dataKey]}`.length))
.reduce((a,b) => a + b, 0);
console.log("totalLength", totalLength);
precent = 100/totalLength;
console.log("precent", precent)
return [...columns].map(c => ({...c, flex: Math.max(c.title.length, `${firstRow[c.dataKey]}`.length) * precent}));
}, [flexAutoAdjustment, columns, data])

Expand Down

0 comments on commit 5fd43cb

Please sign in to comment.