Skip to content
Snippets Groups Projects
Commit 8da28925 authored by esikkala's avatar esikkala
Browse files

Add default active facet to perspective config

parent cbe83a91
No related branches found
No related tags found
No related merge requests found
......@@ -54,7 +54,7 @@ class FacetBar extends React.Component {
constructor(props) {
super(props);
this.state = {
activeFacets: new Set(),
activeFacets: this.props.defaultActiveFacets,
};
}
......@@ -227,7 +227,8 @@ FacetBar.propTypes = {
fetchingResultCount: PropTypes.bool.isRequired,
fetchFacet: PropTypes.func.isRequired,
fetchResultCount: PropTypes.func.isRequired,
updateFacetOption: PropTypes.func.isRequired
updateFacetOption: PropTypes.func.isRequired,
defaultActiveFacets: PropTypes.instanceOf(Set).isRequired,
};
export default withStyles(styles)(FacetBar);
// import akaLogo from '../../img/logos/funders/aka_en_vaaka_rgb.jpg';
export const perspectiveArr = [
{
id: 'manuscripts',
label: 'Manuscripts',
desc: 'Physical manuscript objects.',
// externalUrl: 'https://seco.cs.aalto.fi/',
// thumbImage: akaLogo, // note: the image has to be imported in this js file
defaultActiveFacets: new Set(['prefLabel']),
tabs: [
{
id: 'table',
......@@ -38,6 +35,7 @@ export const perspectiveArr = [
id: 'works',
label: 'Works',
desc: 'Intellectual content carried out by manuscripts.',
defaultActiveFacets: new Set(['prefLabel']),
tabs: [
{
id: 'table',
......@@ -51,6 +49,7 @@ export const perspectiveArr = [
id: 'events',
label: 'Events',
desc: 'Events related to manuscripts.',
defaultActiveFacets: new Set(['type']),
tabs: [
{
id: 'table',
......@@ -64,6 +63,7 @@ export const perspectiveArr = [
id: 'actors',
label: 'Actors',
desc: 'People and institutions related to manuscripts and works.',
defaultActiveFacets: new Set(['prefLabel']),
tabs: [
{
id: 'table',
......@@ -83,6 +83,7 @@ export const perspectiveArr = [
id: 'places',
label: 'Places',
desc: 'Places related to manuscripts and works.',
defaultActiveFacets: new Set(['prefLabel']),
tabs: [
{
id: 'table',
......
......@@ -19,8 +19,8 @@ import Places from '../components//perspectives/Places';
import Actors from '../components//perspectives/Actors';
import All from '../components/perspectives/All';
import InstanceHomePage from '../components/main_layout/InstanceHomePage';
import FeedbackPage from '../components/main_layout/FeedbackPage';
import { perspectiveArr } from '../components/perspectives/PerspectiveArray';
//import FeedbackPage from '../components/main_layout/FeedbackPage';
import { perspectiveArr } from '../components/perspectives/PerspectiveArrayMMM';
import { has } from 'lodash';
import {
fetchResultCount,
......@@ -242,6 +242,7 @@ let SemanticPortal = (props) => {
fetchFacet={props.fetchFacet}
fetchResultCount={props.fetchResultCount}
updateFacetOption={props.updateFacetOption}
defaultActiveFacets={perspective.defaultActiveFacets}
/>
</Grid>
<Grid item xs={12} md={9} className={classes.resultsContainer}>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment