修复pretest界面元件溢出的问题

This commit is contained in:
undefined committed 2020-07-16 17:53:29 +08:00
1 parent 0f23611853
commit 3b9910529e
3 files changed
+47 -94

No files matched your search

@@ -59,6 +59,15 @@ const mapDispatchToProps = (dispatch) => ({
payload: req,
});
},
loadSubmissions() {
dispatch({
type: 'SCRATCHPAD_RECORDS_LOAD_SUBMISSIONS',
payload: request.get(Context.getSubmissionsUrl),
});
},
handleClickRefresh() {
this.loadSubmissions();
},
});
@connect(mapStateToProps, mapDispatchToProps)
@@ -67,6 +76,10 @@ export default class ScratchpadToolbarContainer extends React.PureComponent {
store: PropTypes.object,
};
componentDidMount() {
this.props.loadSubmissions();
}
render() {
return (
<Toolbar>
@@ -96,6 +109,18 @@ export default class ScratchpadToolbarContainer extends React.PureComponent {
{' '}
(F10)
</ToolbarButton>
<ToolbarButton
data-tooltip={i18n('Refresh Records')}
className="scratchpad__toolbar__refresh"
data-global-hotkey="alt+f"
onClick={() => this.props.handleClickRefresh()}
>
<Icon name="refresh" />
{' '}
{i18n('Refresh')}
{' '}
(Alt+F)
</ToolbarButton>
<ToolbarItem>
<select
className="select"