Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • Table Of Contents for SharePoint Table Of Contents for SharePoint
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 9
    • Issues 9
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Microsoft SharePoint
  • SPFx
  • Table Of Contents for SharePointTable Of Contents for SharePoint
  • Issues
  • #1

Closed
Open
Created May 08, 2020 by Laurent Sittler@lsittler©Owner

Button appear after editing page

Summary

The TOC button appear on a page with no headers after been edited.

Your environment

Tenant Release
  • Standard
  • Targeted
Extension version v0
Deployment
  • Tenant App Catalog and install one whole Tenant
  • Tenant App Catalog and install per site collection
  • Site collection app catalog

Current behavior

Once the extension install and deployed First scenario

  1. Create a page with no header
  2. Save it as Draft or Publish it
  3. The TOC button appear

Second scenario

  1. Edit an existing page with no header
  2. Discard changes or Save as Draft or Republish it
  3. 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();
}
Edited Oct 26, 2020 by Laurent Sittler
Assignee
Assign to
Time tracking