Skip to content

Commit

Permalink
BACKLOG-23374 Refetch the view (#1342)
Browse files Browse the repository at this point in the history
  • Loading branch information
AKarmanov authored Nov 18, 2024
1 parent 77095e2 commit fe8cacd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/javascript/JContent/CompareDialog/CompareDialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {useLocation} from 'react-router-dom';
import {decodeHashString} from './util';
import {DisplayAction} from '@jahia/ui-extender';
import {getButtonRenderer} from '../../utils/getButtonRenderer';
import {triggerRefetchAll} from '../JContent.refetches';

const ButtonRendererNoLabel = getButtonRenderer({labelStyle: 'none', defaultButtonProps: {size: 'big'}});
const ButtonRendererShortLabel = getButtonRenderer({labelStyle: 'short', defaultButtonProps: {size: 'big'}});
Expand Down Expand Up @@ -54,7 +55,10 @@ const CompareDialog = () => {
className={styles.actionItem}
icon={<Reload/>}
label={t('jcontent:label.contentManager.refresh')}
onClick={() => dispatch(compareStagingLiveReload())}/>
onClick={() => {
triggerRefetchAll();
dispatch(compareStagingLiveReload());
}}/>
<Button variant="outlined"
size="big"
color="accent"
Expand Down

0 comments on commit fe8cacd

Please sign in to comment.