Comments (3)
Its hard to tell what exactly is broken here since I can't easily tell what changes exist between the sandbox and the RSP ComboBox component. It seems like a 1:1 copy but there are styles that are missing because the Spectrum specific class names don't have their associated styles and there are other behavioral differences from the RSP ComboBox like the popover closing even with "Emulate a focused page" turned on. Can you try unifying the packages so they only use the monopakage import where possible so that there aren't any duplicate package issues? Might be easier to debug if you use the Item/etc implementations straight from @adobe/react-spectrum
and then gradually change them to your custom implementation to see where the break happens.
from react-spectrum.
@LFDanLu When i read the spectrum code the height of the popover is calculating in hooks instead of with css classnames so i think class names aren't the issue. Can you define what is unifying packages because we didn't install any duplicate package versions in the above codesandbox.
So can you please check the code once and tell what we are missing.
from react-spectrum.
I don't think the class names would be the issue either but as I mentioned there are other behavior differences other that the additional whitespace that you are seeing that make me think that there are other changes to the copied code that I can tell from a glance or something else in the setup (duplicate packages/etc) that are causing these issues. Duplicate packages can arise due to each installed package pulling its own version of various dependencies that aren't deduplicated by the package manager automatically. I would recommend you start with first using the ComboBox as is from React Spectrum's @adobe/react-spectrum
package, then slowly replace the implementation bit by bit and see when/where it breaks.
That being said, if you are trying to create your own combobox, I'd highly recommend using the React Aria Components version of it rather than copying the React Spectrum implementation. The React Spectrum implementation comes with many Spectrum Design specific behaviors and may be difficult to untangle and customize. Virtualization support is being worked on for React Aria Components as a whole as well so soon there will be parity between the two.
from react-spectrum.
Related Issues (20)
- [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 5
- Video Controls are not respected when using FocusScope HOT 5
- The code inside `<script>` element rendered by `<LocalizedStringProvider>` doesn't run on Next.js `not-found.js` page HOT 3
- Support hover event for Tabs
- Buttons don't get pressed using Vimium HOT 4
- MenuItem with href doesn't work in Chome device toolbar HOT 3
- No matching export for import "getSyntheticLinkProps" HOT 34
- Is there any document available that guides how to use the `Virtualizer` component? HOT 2
- Type errors when rendering components in React 17 HOT 2
- Tabs are not getting rendered in specific scenario HOT 2
- RAC `TagGroup` within a `GridList` item causes a crash in 1.3.0 HOT 3
- Combobox input loses its value after scrolling down and back up the page. HOT 1
- Supporting table cell selection HOT 1
- Cards: Waterfall view does not correctly layout on initial load, even when the size is provided HOT 2
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.