Open YuanboXue-Amber opened 1 year ago
50 cents: I am not a big fun of imperative API idea, I would prefer a declarative option more, something like:
function App() {
const connectionRef = React.useRef();
return (
<>
<PopoverSurface>
<VirtualInheritance.Parent ref={connectionRef} />
</PopoverSurface>
<Dialog>
<VirtualInheritance.Child ref={connectionRef} />
</Dialog>
</>
);
}
Before we progress we need to better understand partners' requirements. This feature has not been requested often, let's wait for more reports.
Because this issue has not had activity for over 180 days, we're automatically closing it for house-keeping purposes.
Still require assistance? Please, create a new issue with up-to date details.
Because this issue has not had activity for over 180 days, we're automatically closing it for house-keeping purposes.
Still require assistance? Please, create a new issue with up-to date details.
This issue has not had activity for over 180 days! We're adding Soft close label and will close it soon for house-keeping purposes. Still require assistance? Please add comment - "keep open".
unstale
Library
React Components / v9 (@fluentui/react-components)
Describe the feature that you would like added
In this example: https://codesandbox.io/s/determined-aj-h8g7vh?file=/example.tsx
PopoverSurface
contains aButton
that opensDialog
.Dialog
is not children ofPopoverSurface
in the react tree, and therefore not its virtual child. So when clicking 'close' button to close Dialog, Popover closes as well. The codesandbox setsDialog
to be the virtual child ofPopoverSurface
by callingsetVirtualParent
. So when Dialog closes, Popover can remain open.What about having a more user friendly API on Dialog that sets the virtual parent? Maybe something like:
Have you discussed this feature with our team
No response
Additional context
Please note that this is a new feature request. Fluent v0 does not handle this out of the box either: https://codesandbox.io/s/fluent-ui-example-forked-lqde9t?file=/example.js
Validations