mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-12 21:38:35 +03:00
Allow categories to be selected by title and not id; allow for primary key field
This commit is contained in:
@@ -34,7 +34,7 @@ class TimelineCategories extends React.Component {
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
|
||||
console.info(this.props.getCategoryY(cat));
|
||||
return (
|
||||
<>
|
||||
<g
|
||||
@@ -62,7 +62,7 @@ class TimelineCategories extends React.Component {
|
||||
const { dims, categories, fallbackLabel } = this.props;
|
||||
const categoriesExist = categories && categories.length > 0;
|
||||
const renderedCategories = categoriesExist
|
||||
? this.props.categories.map((cat, idx) => this.renderCategory(cat, idx))
|
||||
? categories.map((cat, idx) => this.renderCategory(cat, idx))
|
||||
: this.renderCategory(fallbackLabel, 0);
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user