mirror of
https://github.com/chenasraf/redar-browser.git
synced 2026-05-18 01:59:00 +00:00
Bugfixes
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
Learn how to configure a non-root public URL by running `npm run build`.
|
||||
-->
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
||||
<title>React App</title>
|
||||
<title>JSON Redar</title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
|
||||
@@ -51,7 +51,7 @@ class DataTable extends React.Component<I.Props, I.State> {
|
||||
}
|
||||
|
||||
parsed = parsed.map((row: any, i: number) => {
|
||||
row._id = row._id || row.id || 'row-' + i
|
||||
row._id = row._id || row.id || i
|
||||
return row
|
||||
})
|
||||
|
||||
|
||||
@@ -71,9 +71,16 @@ class KeyList extends React.Component<I.IProps, I.IState> {
|
||||
}
|
||||
|
||||
private columnListFromRow(row: any) {
|
||||
return ['_id'].concat(Object.keys(row).filter((k: string) => (
|
||||
k.toLowerCase() !== 'id' && k.toLowerCase() !== '_id'
|
||||
)))
|
||||
const keys = ['_id']
|
||||
|
||||
Object.keys(row).sort().forEach(k => {
|
||||
k = k.toLowerCase()
|
||||
if (k !== '_id' && k !== 'id') {
|
||||
keys.push(k)
|
||||
}
|
||||
})
|
||||
|
||||
return keys
|
||||
}
|
||||
|
||||
private get keyListElements() {
|
||||
|
||||
Reference in New Issue
Block a user