Skip to content

Commit 3e65d7d

Browse files
authored
chore: fix react 19 integration tests type issues for v9 (#34722)
1 parent bbaeb73 commit 3e65d7d

File tree

33 files changed

+66
-37
lines changed

33 files changed

+66
-37
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "fix: adjust compoponent props type to support react 19",
4+
"packageName": "@fluentui/react-accordion",
5+
"email": "dmytrokirpa@microsoft.com",
6+
"dependentChangeType": "patch"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "fix: adjust PresenseGroup types to support react 19",
4+
"packageName": "@fluentui/react-motion",
5+
"email": "dmytrokirpa@microsoft.com",
6+
"dependentChangeType": "patch"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "prerelease",
3+
"comment": "\"fix: addjust type for ref props to add null to support react 19\" ",
4+
"packageName": "@fluentui/react-virtualizer",
5+
"email": "dmytrokirpa@microsoft.com",
6+
"dependentChangeType": "patch"
7+
}

packages/react-components/react-accordion/library/etc/react-accordion.api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ export type AccordionPanelState = ComponentState<AccordionPanelSlots> & {
149149
};
150150

151151
// @public (undocumented)
152-
export type AccordionProps<Value = AccordionItemValue> = ComponentProps<AccordionSlots> & {
152+
export type AccordionProps<Value = AccordionItemValue> = Omit<ComponentProps<AccordionSlots>, 'onToggle'> & {
153153
defaultOpenItems?: Value | Value[];
154154
collapsible?: boolean;
155155
multiple?: boolean;

packages/react-components/react-accordion/library/src/components/Accordion/Accordion.types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export type AccordionToggleData<Value = AccordionItemValue> = {
2525
openItems: Value[];
2626
};
2727

28-
export type AccordionProps<Value = AccordionItemValue> = ComponentProps<AccordionSlots> & {
28+
export type AccordionProps<Value = AccordionItemValue> = Omit<ComponentProps<AccordionSlots>, 'onToggle'> & {
2929
/**
3030
* Default value for the uncontrolled state of the panel.
3131
*/

packages/react-components/react-motion-components-preview/stories/src/Collapse/CollapseCustomization.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ const LoremIpsum = () => (
7171

7272
export const Customization = () => {
7373
const classes = useClasses();
74-
const motionRef = React.useRef<MotionImperativeRef>();
74+
const motionRef = React.useRef<MotionImperativeRef>(null);
7575

7676
const [animateOpacity, setAnimateOpacity] = React.useState(true);
7777
const [playbackRate, setPlaybackRate] = React.useState<number>(30);

packages/react-components/react-motion-components-preview/stories/src/Fade/FadeCustomization.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ const LoremIpsum = () => (
6969

7070
export const Customization = () => {
7171
const classes = useClasses();
72-
const motionRef = React.useRef<MotionImperativeRef>();
72+
const motionRef = React.useRef<MotionImperativeRef>(null);
7373

7474
const [playbackRate, setPlaybackRate] = React.useState<number>(30);
7575
const [visible, setVisible] = React.useState<boolean>(true);

packages/react-components/react-motion-components-preview/stories/src/Scale/ScaleCustomization.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ const LoremIpsum = () => (
7979

8080
export const Customization = () => {
8181
const classes = useClasses();
82-
const motionRef = React.useRef<MotionImperativeRef>();
82+
const motionRef = React.useRef<MotionImperativeRef>(null);
8383

8484
const [animateOpacity, setAnimateOpacity] = React.useState(false);
8585
const [playbackRate, setPlaybackRate] = React.useState<number>(30);

packages/react-components/react-motion/library/etc/react-motion.api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export type PresenceDirection = 'enter' | 'exit';
127127

128128
// @public (undocumented)
129129
export class PresenceGroup extends React_2.Component<PresenceGroupProps, PresenceGroupState> {
130-
constructor(props: PresenceGroupProps, context: unknown);
130+
constructor(props: PresenceGroupProps, context?: unknown);
131131
// (undocumented)
132132
componentDidMount(): void;
133133
// (undocumented)

packages/react-components/react-motion/library/src/components/PresenceGroup.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export class PresenceGroup extends React.Component<PresenceGroupProps, PresenceG
3333
};
3434
}
3535

36-
constructor(props: PresenceGroupProps, context: unknown) {
36+
constructor(props: PresenceGroupProps, context?: unknown) {
3737
// eslint-disable-next-line @typescript-eslint/no-deprecated
3838
super(props, context);
3939

0 commit comments

Comments
 (0)