Skip to content

px-dropdown can now optionally hoist the overlay portion out of a stacking context trap

Compare
Choose a tag to compare
@nonmetalhail nonmetalhail released this 23 Feb 22:12
· 64 commits to master since this release
  • Adding px-overlay-content to optionally hoist content.
  • px-dropdown was broken up into two sub components to facilitate hoisting.
    • Adds JS to dynamically watch for a trigger element to be added to the trigger slot so we can avoid breaking the API. We can't just pass the trigger down because in v1 Shadow DOM slots passed down twice that are empty still wipe out any
      default content.
    • Refactor px-dropdown-content to just listen for click event emitting from the trigger
    • Move all code that deals with items into px-dropdown-content to cleanly seperate concerns. px-dropdown is just a wrapper that connects the trigger and content together and passes properties and slotted content down.