"Delete" action better with browser history (i.e. back button now works correctly with the Delete dialog).

This commit is contained in:
Tomas Bures 2017-06-09 12:01:01 +02:00
parent ed5b81b6e6
commit 1d1355df34
4 changed files with 41 additions and 22 deletions

View file

@ -109,9 +109,9 @@ class TreeTable extends Component {
const linksContainer = jQuery('<span class="mt-action-links"/>');
const links = actionLinks.map(({label, link}) => {
const lnkHtml = ReactDOMServer.renderToStaticMarkup(<a href="#">{label}</a>);
const lnkHtml = ReactDOMServer.renderToStaticMarkup(<a href="">{label}</a>);
const lnk = jQuery(lnkHtml);
lnk.click(() => this.navigateTo(link(node.key)));
lnk.click((evt) => { evt.preventDefault(); this.navigateTo(link(node.key)) });
linksContainer.append(lnk);
});