()
| 379 | }, [queue, isExpanded, close]); |
| 380 | |
| 381 | let collapse = () => { |
| 382 | regionRef.current?.focus(); |
| 383 | ctx.toggleExpanded(); |
| 384 | }; |
| 385 | |
| 386 | // Prevent scroll, aria hide outside, and contain focus when expanded, since we take over the whole screen. |
| 387 | // Attach event handler to the ref since ToastRegion doesn't pass through onKeyDown. |