Skip to content

Commit

Permalink
06 change codes
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael18811380328 committed Jun 5, 2024
1 parent 0763a07 commit 235fcad
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion frontend/src/pages/wiki2/view-structure/views/view-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,11 @@ class ViewItem extends Component {
this.forceUpdate();
};

onAddNewPage = (newPage) => {
const { view } = this.props;
this.props.addPageInside(Object.assign({ parentPageId: view.id }, newPage));
};

render() {
const {
connectDragSource, connectDragPreview, connectDropTarget, isOver, canDrop, isDragging,
Expand Down Expand Up @@ -276,7 +281,7 @@ class ViewItem extends Component {
{this.state.isShowInsertPage &&
<AddNewPageDialog
toggle={this.toggleInsertPage}
onAddNewPage={(obj) => this.props.addPageInside(Object.assign({ parentPageId: view.id }, obj))}
onAddNewPage={this.onAddNewPage}
title={gettext('Add page inside')}
/>
}
Expand Down

0 comments on commit 235fcad

Please sign in to comment.