robsontenorio / mary

Laravel Blade UI Components for Livewire 3
https://mary-ui.com
Other
804 stars 88 forks source link

Update Dropdown.php #485

Closed bestmomo closed 2 weeks ago

Enrica-r commented 2 weeks ago

@bestmomo: Thank you very much for your quick solution.

The code line :style="{'top': ($refs.dropdownButton.getBoundingClientRect().bottom + window.scrollY) + 'px', 'left': has one disadvantage. If the trigger button is near the screen bottom, the box falls out of view.

I tried to replace it with x-anchor.{{ $right ? 'bottom-end' : 'bottom-start' }}="$refs.dropdownButton" but together with your class definition. Then it works as it should. Left and right positioning is working also.

bestmomo commented 2 weeks ago

Yes there is this issue and another one, when screen is high it no longer sticks to the trigger. This issue is hard to manage...

robsontenorio commented 2 weeks ago

I think this issue can be solved by changing some css class on original code from this component.

I will give a try on next days.

robsontenorio commented 2 weeks ago

Closing this, please follow #483