mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2024-11-10 19:56:54 +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'};
|
||||
|
||||
export default class StackTraceTab extends Component {
|
||||
static defaultProps = {
|
||||
openFile
|
||||
}
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
|
@ -78,7 +81,7 @@ export default class StackTraceTab extends Component {
|
|||
const originalStackFrame = parsedFramesNoSourcemaps[frameIndex];
|
||||
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
|
||||
style={
|
||||
|
@ -54,7 +55,9 @@ exports[`StackTraceTab component should render the link to docs 1`] = `
|
|||
`;
|
||||
|
||||
exports[`StackTraceTab component should render with no props 1`] = `
|
||||
<StackTraceTab>
|
||||
<StackTraceTab
|
||||
openFile={[Function]}
|
||||
>
|
||||
<div
|
||||
style={
|
||||
Object {
|
||||
|
@ -116,6 +119,7 @@ exports[`StackTraceTab component should render with props, but without stack 1`]
|
|||
},
|
||||
}
|
||||
}
|
||||
openFile={[Function]}
|
||||
>
|
||||
<div
|
||||
style={
|
||||
|
@ -178,6 +182,7 @@ exports[`StackTraceTab component should render with trace stack 1`] = `
|
|||
},
|
||||
}
|
||||
}
|
||||
openFile={[Function]}
|
||||
>
|
||||
<div
|
||||
style={
|
||||
|
|
Loading…
Reference in New Issue
Block a user