Skip to content

[Chore]: migrate react-search to new slot API #28778

@bsunderhus

Description

@bsunderhus

@fluentui/react-search-preview package should migrate to the new slot API methods (slot and assertSlot), but there are some problems in the component render method that got in the way of the automation codemod that did the upgrade.

It seems like logic from state hook is leaking to render method, using the new API makes it impossible to inject logic via overrides on the render method.

const rootSlots = {
contentAfter: slots.contentAfter && {
...slotProps.contentAfter,
children: (
<>
{slotProps.contentAfter.children}
{slots.dismiss && <slots.dismiss {...slotProps.dismiss} />}
</>
),
},
};

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions