Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DiscussionPageResolver<Attrs, RouteArgs>

A custom route resolver for DiscussionPage that generates the same key to all posts on the same discussion. It triggers a scroll when going from one post to another in the same discussion.

Type parameters

Hierarchy

Index

Constructors

constructor

Properties

component

component: new () => DiscussionPage<Attrs>

Type declaration

routeName

routeName: string

Static scrollToPostNumber

scrollToPostNumber: null | number = null

Methods

canonicalizeDiscussionSlug

  • canonicalizeDiscussionSlug(slug: undefined | string): undefined | string
  • Remove optional parts of a discussion's slug to keep the substring that bijectively maps to a discussion object. By default this just extracts the numerical ID from the slug. If a custom discussion slugging driver is used, this may need to be overriden.

    Parameters

    • slug: undefined | string

    Returns undefined | string

makeAttrs

  • makeAttrs(vnode: Vnode<Attrs, DiscussionPage<Attrs>>): Attrs & { routeName: string }

makeKey

  • makeKey(): string

onmatch

  • onmatch(args: Attrs & RouteArgs, requestedPath: string, route: string): new () => DiscussionPage<Attrs>

render

Generated using TypeDoc version 0.22.10