Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug]: fix sorting and clustering issue #60

Merged
merged 1 commit into from
Oct 31, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Graphs/GeoMap/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ class GeoMap extends AbstractGraph {
<MarkerClusterer
ignoreHidden={false}
averageCenter
gridSize={60}
gridSize={40}
onClusteringEnd={ this.handleClustererEnd}
onClick={ this.handleClusterClick }
>
Expand Down
12 changes: 2 additions & 10 deletions Graphs/Table/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ class Table extends AbstractGraph {
)
}

if(columnData) {
if(columnData || columnData === 0) {
data[key] = typeof(columnData) === "boolean" ? columnData.toString().toUpperCase() : columnData
}
}
Expand Down Expand Up @@ -483,15 +483,7 @@ class Table extends AbstractGraph {
}

handleStaticSorting(column, order) {
this.filterData = this.filterData.sort(
(a, b) => {
if (order === 'desc')
return b[column] > a[column] ? 1 : -1

return a[column] > b[column] ? 1 : -1
}
);

this.filterData = _.orderBy(this.filterData, [column], [order]);
/**
* Resetting the paging due to sorting
*/
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ The use of the graphs module is to provide a module to quickly shows your data i
"react-tap-event-plugin": "2.0.1",
"react-tooltip": "^3.2.1",
"object-path": "^0.11.4",
"react-google-maps": "^9.4.5"
"react-google-maps": "^9.4.5",
"prop-types": "^15.6.2",
"react-csv": "1.0.8",
"react-copy-to-clipboard": "^4.3.1",
"react-modal": "^3.5.1",
```
## Usage examples
- Make sure your current project must be a valid git project, if not then run the below command
Expand Down