mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 10:16:27 +00:00
[web] fix selectFlows
This commit is contained in:
parent
571c817f21
commit
8da623c603
@ -29,6 +29,6 @@ function FlowMenu({ flow }) {
|
|||||||
|
|
||||||
export default connect(
|
export default connect(
|
||||||
state => ({
|
state => ({
|
||||||
flow: state.flows.list.data[state.flows.views.main.selected[0]],
|
flow: state.flows.list.byId[state.flows.views.main.selected[0]],
|
||||||
})
|
})
|
||||||
)(FlowMenu)
|
)(FlowMenu)
|
||||||
|
@ -6,7 +6,7 @@ import { Key } from '../utils.js'
|
|||||||
import Splitter from './common/Splitter'
|
import Splitter from './common/Splitter'
|
||||||
import FlowTable from './FlowTable'
|
import FlowTable from './FlowTable'
|
||||||
import FlowView from './FlowView'
|
import FlowView from './FlowView'
|
||||||
import { selectFlow, updateFilter, updateHighlight } from '../ducks/views/main'
|
import { select as selectFlow, updateFilter, updateHighlight } from '../ducks/views/main'
|
||||||
|
|
||||||
class MainView extends Component {
|
class MainView extends Component {
|
||||||
|
|
||||||
@ -185,7 +185,7 @@ export default connect(
|
|||||||
flows: state.flows.views.main.view.data,
|
flows: state.flows.views.main.view.data,
|
||||||
filter: state.flows.views.main.filter,
|
filter: state.flows.views.main.filter,
|
||||||
highlight: state.flows.views.main.highlight,
|
highlight: state.flows.views.main.highlight,
|
||||||
selectedFlow: state.flows.list.data[state.flows.views.main.selected[0]]
|
selectedFlow: state.flows.list.byId[state.flows.views.main.selected[0]]
|
||||||
}),
|
}),
|
||||||
{
|
{
|
||||||
selectFlow,
|
selectFlow,
|
||||||
|
@ -164,7 +164,9 @@ export function updateSorter(column, desc) {
|
|||||||
* @public
|
* @public
|
||||||
*/
|
*/
|
||||||
export function select(id) {
|
export function select(id) {
|
||||||
return { type: SELECT, currentSelection: getState().flows.views.main.selected[0], id }
|
return (dispatch, getState) => {
|
||||||
|
dispatch({ type: SELECT, currentSelection: getState().flows.views.main.selected[0], id })
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user