-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autocomplete: Add position prop #2846
base: main
Are you sure you want to change the base?
Autocomplete: Add position prop #2846
Conversation
❌ Deploy Preview for moduswebcomponents failed. Why did it fail? →
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ElishaSamPeterPrabhu Once I select an option from the bottom of the list, I'm not able to change it.
User.Inputs._.Autocomplete.-.Default.Storybook.-.Google.Chrome.2024-09-12.00-17-54.mp4
Added animation change as fix |
8604b9d
to
d6ba058
Compare
|
||
initializePopper(): void { | ||
const optionsContainer = this.el.shadowRoot.querySelector(`.options-container`) as HTMLElement; | ||
const referenceElement = this.el as HTMLElement; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use the chips-container as reference element? Otherwise the dropdown will be positioned based on the entire container height.
|
||
this.popperInstance = createPopper(referenceElement, optionsContainer, { | ||
placement: 'bottom-start', | ||
strategy: this.position === 'auto' ? 'fixed' : 'absolute', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add a comment about why we use fixed strategy for auto position
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…onent-placement-relative-to-the-wrapped-item' of https://github.com/trimble-oss/modus-web-components into 2801-autocomplete-add-position-property-to-control-component-placement-relative-to-the-wrapped-item
This reverts commit ec9a0b4.
Description
References
Fixes #2801
Type of change
How Has This Been Tested?
Checklist