Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPFx Extension ApplicationCustomizerContext not compatible to BaseComponentContext on SiteBreadcrumb #1868

Closed
cygnus-dawn opened this issue Aug 19, 2024 · 1 comment

Comments

@cygnus-dawn
Copy link

cygnus-dawn commented Aug 19, 2024

Category

[ ] Enhancement

[X] Bug

[ ] Question

Version

Please specify what version of the library you are using: [3.19.0]

Expected / Desired Behavior / Question

SiteBreadcrumb should accept a context type of ApplicationCustomizerContext as part of it's props

Observed Behavior

Getting this error:
Type 'ApplicationCustomizerContext' is not assignable to type 'BaseComponentContext'.
Types have separate declarations of a private property '_serviceScope'.

Steps to Reproduce

used node v18.20.2
ran yeoman generator to provision an spfx application customizer extension on v1.18.2
installed this library
installed react/react-dom v17.0.1

import * as React from 'react';
import { BaseApplicationCustomizer } from "@microsoft/sp-application-base";
import { SiteBreadcrumb, ISiteBreadcrumbProps } from "@pnp/spfx-controls-react/lib/SiteBreadcrumb";
...
export default class HelloWorldApplicationCustomizer extends BaseApplicationCustomizer<IHellowWorldApplicationCustomizerProperties> {
...
		const props: ISiteBreadcrumbProps = {
			context: this.context
		}
		const test = React.createElement(SiteBreadcrumb, props);
...
Copy link

Thank you for submitting your first issue to this project.

@cygnus-dawn cygnus-dawn closed this as not planned Won't fix, can't repro, duplicate, stale Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant