Button appear after editing page
Summary
The TOC button appear on a page with no headers after been edited.
Your environment
Tenant Release |
|
Extension version | v0 |
Deployment |
|
Current behavior
Once the extension install and deployed First scenario
- Create a page with no header
- Save it as Draft or Publish it
- The TOC button appear
Second scenario
- Edit an existing page with no header
- Discard changes or Save as Draft or Republish it
- The TOC button appear
Expected behavior
If a page does not contains any header, after editing it, the button should still hide.
Additional information
Expand for output related to your SharePoint Environment
Into table of content TSX' file, lines 45-47, after the of change edit mode, the button will display even if headers are present or not into the content. The content must be check again.} else if (prevProps.tocPageMode != this.props.tocPageMode && this.props.tocPageMode == 0) {
- this.setState({
- displayBtn: true
- });
+ this.checkHeaders();
}