Comments (1)
The reason it's happening is because we only use the state from the DialogTrigger, ModalOverlay doesn't use its internal state anymore when it's wrapped by a DialogTrigger
Issue is, we can't just merge onOpenChange into the state, we'd actually need to intercept open/close/toggle, and those may not result in an actual state change, so we may fire onOpenChange when we shouldn't.
If we wait for the parent to resolve it, then we'll fire the event too late.
We might be able to use a register pattern, but it'd be weird to add that to the hooks as it's an implementation detail of RAC. Maybe we could add it to RAC. That would likely cause some additional renders.
Maybe we can just warn people who try to pass onOpenChange to a component which has given up its state control to a parent?
from react-spectrum.
Related Issues (20)
- From Collection.mjs : use-sync-external-store/shim/index.js doesn't provide an export named: 'useSyncExternalStore' HOT 3
- Typosquatting on react-aria/toast? HOT 1
- RAC `Slider` causes "No label associated with a form field" issue HOT 3
- [useTablist] tabpanel elements are not focusable when layout differs as per docs HOT 7
- Submenu doesn't open on arrow key when using typeahead to select it if keypresses are made once it's already been focussed HOT 4
- Default value for `placement` prop in RAC Tooltip docs should be `'top'` instead of `'bottom'` HOT 1
- Textfield validation icon is clipped out of the box HOT 1
- useListState is entering infinite loop after removing last focused item that is not disabled HOT 2
- useSliderThumb - excludeFromTabOrder won't modify the tabIndex HOT 4
- React Suspense components wrapped in Provider emit runtime errors when using SSR HOT 1
- Video Controls are not respected when using FocusScope HOT 3
- The code inside `<script>` element rendered by `<LocalizedStringProvider>` doesn't run on Next.js `not-found.js` page HOT 2
- Support hover event for Tabs
- Buttons don't get pressed using Vimium HOT 1
- MenuItem with href doesn't work in Chome device toolbar HOT 2
- No matching export for import "getSyntheticLinkProps" HOT 33
- Is there any document available that guides how to use the `Virtualizer` component? HOT 1
- Type errors when rendering components in React 17 HOT 2
- Tabs are not getting rendered in specific scenario HOT 1
- RAC `TagGroup` within a `GridList` item causes a crash in 1.3.0 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-spectrum.