()
| 388 | }, [queue, isExpanded, close]); |
| 389 | |
| 390 | let collapse = () => { |
| 391 | regionRef.current?.focus(); |
| 392 | ctx.toggleExpanded(); |
| 393 | }; |
| 394 | |
| 395 | // Prevent scroll, aria hide outside, and contain focus when expanded, since we take over the whole screen. |
| 396 | // Attach event handler to the ref since ToastRegion doesn't pass through onKeyDown. |