|
@@ -37,12 +37,18 @@ class Sidebar extends React.Component {
|
37
|
37
|
this.props.history.push(PAGE.WORKSPACE.CONTENT_LIST(idWs))
|
38
|
38
|
}
|
39
|
39
|
|
|
40
|
+ // not used, right now, link on sidebar filters is a <Link>
|
40
|
41
|
handleClickContentFilter = (idWs, filter) => {
|
41
|
42
|
const { workspace, history } = this.props
|
42
|
43
|
|
43
|
44
|
const newFilter = workspace.filter.includes(filter) ? [] : [filter] // use an array to allow multiple filters (NYI)
|
44
|
45
|
|
|
46
|
+ console.log('wtf')
|
45
|
47
|
history.push(`${PAGE.WORKSPACE.CONTENT_LIST(idWs)}?type=${newFilter.join(';')}`) // workspace.filter gets updated on react redraw from match.params
|
|
48
|
+
|
|
49
|
+ // obviously, it's ugly to use custom event to tell WorkspaceContent to refresh, but since WorkspaceContent
|
|
50
|
+ // will end up being an App, it'll have to be that way. So it's fine
|
|
51
|
+ GLOBAL_dispatchEvent({ type: 'refreshContentList', data: {} })
|
46
|
52
|
}
|
47
|
53
|
|
48
|
54
|
handleClickToggleSidebar = () => this.setState(prev => ({sidebarClose: !prev.sidebarClose}))
|
|
@@ -70,7 +76,7 @@ class Sidebar extends React.Component {
|
70
|
76
|
isOpenInSidebar={ws.isOpenInSidebar}
|
71
|
77
|
onClickTitle={() => this.handleClickWorkspace(ws.id, !ws.isOpenInSidebar)}
|
72
|
78
|
onClickAllContent={this.handleClickAllContent}
|
73
|
|
- onClickContentFilter={this.handleClickContentFilter}
|
|
79
|
+ // onClickContentFilter={this.handleClickContentFilter}
|
74
|
80
|
key={ws.id}
|
75
|
81
|
/>
|
76
|
82
|
)}
|