Wip/sergeigarin/fix-focus (#11112)

* Fix selecting directory after creating

* Fix focusing
This commit is contained in:
Sergei Garin 2024-09-18 12:28:05 +03:00 committed by GitHub
parent 862100c7c0
commit 55869327d9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 20 deletions

View File

@ -151,7 +151,7 @@ const DIALOG_STYLES = tv({
* Can be used to display alerts, confirmations, or other content. */
export function Dialog(props: DialogProps) {
const {
children: Children,
children,
title,
type = 'modal',
closeButton = 'normal',
@ -304,9 +304,7 @@ export function Dialog(props: DialogProps) {
<suspense.Suspense
loaderProps={{ minHeight: type === 'fullscreen' ? 'full' : 'h32' }}
>
{typeof Children === 'function' ?
<Children {...opts} />
: Children}
{typeof children === 'function' ? children(opts) : children}
</suspense.Suspense>
</errorBoundary.ErrorBoundary>
</div>

View File

@ -79,23 +79,17 @@ function InviteUsersModalContent(props: InviteUsersModalContentProps) {
return (
<Stepper state={stepperState} renderStep={() => null}>
{({ currentStep }) => (
<>
{currentStep === 0 && (
<inviteUsersForm.InviteUsersForm
onSubmitted={onInviteUsersFormInviteUsersFormSubmitted}
/>
)}
<Stepper.StepContent index={0}>
<inviteUsersForm.InviteUsersForm onSubmitted={onInviteUsersFormInviteUsersFormSubmitted} />
</Stepper.StepContent>
{currentStep === 1 && (
<Stepper.StepContent index={1}>
<inviteUsersSuccess.InviteUsersSuccess
{...props}
invitationLink={invitationLink}
emails={submittedEmails}
/>
)}
</>
)}
</Stepper.StepContent>
</Stepper>
)
}