elastic / eui

Elastic UI Framework 🙌
https://eui.elastic.co/
Other
6.09k stars 832 forks source link

Elastic UI ComboBox dropdown positioning #7876

Closed DarioBuljovcic closed 2 months ago

DarioBuljovcic commented 3 months ago

Drop down from the combo box when its on the bottom of the page shrinks upwards instead of downwards

Environment and versions

Here is the combo box

<EuiComboBox
            aria-label="Accessible screen reader label"
            placeholder="Izaberite razrede"
            isInvalid={errorList.classList}
            options={classList}
            selectedOptions={selectedClasses}
            onChange={onChange}
            data-test-subj="demoComboBox"
            isClearable={true}

          />

Here is a picture of how it looks. Untitled

Top style of the selected div doesnt change

Screenshot from 2024-07-08 09-16-29

tkajtoch commented 2 months ago

Hi @DarioBuljovcic! Thanks for reporting this behavior. Could you share a reproducible example in CodeSandbox? I'm not sure if I understand your whole setup. Thanks!

DarioBuljovcic commented 2 months ago

Hi, I'm sorry but I don't think i can reproduce it. When i put my code into the sandbox it works how it should. I will try to test out more to see if i find what is the problem.

It's top value doesn't change when the number of items changes. So for example i have 10 items and i search so that only two items remain, the items box top value doesn't push it down but only it's height changes and it just stays floating up

It's like it doesn't know that it's on top of the combobox and not on the bottom

DarioBuljovcic commented 2 months ago

Here is another example of how it looks. It works in sandbox but in my app it doesn't.

Screenshot from 2024-07-15 08-43-22

I copied the code from https://eui.elastic.co/#/forms/combo-box example number 4.

JasonStoltz commented 2 months ago

Hey @DarioBuljovcic. My assumption if it can't be reproduced in a Codesandbox is that it is something your project setup. I don't have any ideas of what the problem is. Unfortunately, without something reproducible, we won't be able to help you debug it.

tkajtoch commented 2 months ago

I'm closing this as it's related to @DarioBuljovcic setup and isn't an actual EUI bug. Please feel free to open a new issue if you believe this is incorrect, providing reproduction steps and a CodeSandbox example.