Skip to content

Kepler.gl is a powerful open source geospatial analysis tool for large-scale data sets.

[Bug] allow empty data rows (#1624)

Shan He5e6b1c453975
diff --git a/src/components/index.js b/src/components/index.js
index e419f6b59..ba41a9b28 100644
--- a/src/components/index.js
+++ b/src/components/index.js
@@ -117,6 +117,9 @@ export {default as LoadStorageMapFactory} from './modals/load-storage-map';
export {default as ExportJsonMapFactory} from './modals/export-map-modal/export-json-map';
export {default as ExportHtmlMapFactory} from './modals/export-map-modal/export-html-map';
+// // notification panel
+export {default as NotificationItemFactory} from './notification-panel/notification-item';
+
// // common factory
export {default as AnimationControlFactory} from './common/animation-control/animation-control';
export {default as AnimationControllerFactory} from './common/animation-control/animation-controller';
diff --git a/src/processors/data-processor.js b/src/processors/data-processor.js
index 83cff96de..e5bf3a9e9 100644
--- a/src/processors/data-processor.js
+++ b/src/processors/data-processor.js
@@ -435,8 +435,13 @@ export function analyzerTypeToFieldType(aType) {
* }));
*/
export function processRowObject(rawData) {
- if (!Array.isArray(rawData) || !rawData.length) {
+ if (!Array.isArray(rawData)) {
return null;
+ } else if (!rawData.length) {
+ // data is empty
+ return {
+ fields: [], rows: []
+ }
}
const keys = Object.keys(rawData[0]);
diff --git a/src/reducers/ui-state-updaters.d.ts b/src/reducers/ui-state-updaters.d.ts
index f604d754f..b7aad4a07 100644
--- a/src/reducers/ui-state-updaters.d.ts
+++ b/src/reducers/ui-state-updaters.d.ts
@@ -65,6 +65,8 @@ export type Notifications = {
type: string;
topic: string;
id: string;
+ count: number;
+ isExpanded?: boolean;
};
export type Locale = string;