mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-02-28 09:20:38 +03:00
[redux-devtools-trace-monitor] StackTraceTab: Make openFile
prop for custom openFile function (#458)
This commit is contained in:
parent
eef342fb64
commit
2be2f652d8
|
@ -7,6 +7,9 @@ import openFile from './openFile';
|
||||||
const rootStyle = {padding: '5px 10px'};
|
const rootStyle = {padding: '5px 10px'};
|
||||||
|
|
||||||
export default class StackTraceTab extends Component {
|
export default class StackTraceTab extends Component {
|
||||||
|
static defaultProps = {
|
||||||
|
openFile
|
||||||
|
}
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
|
@ -78,7 +81,7 @@ export default class StackTraceTab extends Component {
|
||||||
const originalStackFrame = parsedFramesNoSourcemaps[frameIndex];
|
const originalStackFrame = parsedFramesNoSourcemaps[frameIndex];
|
||||||
console.log("Original stack frame: ", originalStackFrame);
|
console.log("Original stack frame: ", originalStackFrame);
|
||||||
*/
|
*/
|
||||||
openFile(fileName, lineNumber, matchingStackFrame);
|
this.props.openFile(fileName, lineNumber, matchingStackFrame);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,6 +33,7 @@ exports[`StackTraceTab component should render the link to docs 1`] = `
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
openFile={[Function]}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
style={
|
style={
|
||||||
|
@ -54,7 +55,9 @@ exports[`StackTraceTab component should render the link to docs 1`] = `
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`StackTraceTab component should render with no props 1`] = `
|
exports[`StackTraceTab component should render with no props 1`] = `
|
||||||
<StackTraceTab>
|
<StackTraceTab
|
||||||
|
openFile={[Function]}
|
||||||
|
>
|
||||||
<div
|
<div
|
||||||
style={
|
style={
|
||||||
Object {
|
Object {
|
||||||
|
@ -116,6 +119,7 @@ exports[`StackTraceTab component should render with props, but without stack 1`]
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
openFile={[Function]}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
style={
|
style={
|
||||||
|
@ -178,6 +182,7 @@ exports[`StackTraceTab component should render with trace stack 1`] = `
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
openFile={[Function]}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
style={
|
style={
|
||||||
|
|
Loading…
Reference in New Issue
Block a user