Vonage / vivid

Vonage's web UI 🎨 toolbelt
https://vivid.vonage.com
Apache License 2.0
38 stars 6 forks source link

Select component is hidden inside DataGrid #1201

Closed agieralt closed 1 year ago

agieralt commented 2 years ago

Describe the bug Posted here: (https://vonage.slack.com/archives/C013F0YKH99/p1642607108078600) Select component, when expanded, is completely hidden inside cell of DataGrid. image

To Reproduce Steps to reproduce the behavior:

  1. Create DataGrid component
  2. Create CellRenderer that shows Select component
  3. Click on Select

Expected behavior I'd like to see expanded list of Select. (like in native one) image

Desktop (please complete the following information):

agieralt commented 2 years ago

I've also tried to fix this with code that @k-paxian shared with me. Although it helped in his case, did not resolve mine :(

`const createVaadinGridStylePatchElement = () => {
  // This patch is needed to show slider tooltips uncropped by the grid
  const styleElement = document.createElement('style')
  styleElement.innerHTML = `
    #header {
      z-index: 0;
    }
    [part~='cell'] ::slotted(vaadin-grid-cell-content) {
      overflow: visible;
    }`
  return styleElement
}

export const vwcDataGridRefFunction = gridElement =>
  setTimeout(() => {
    gridElement?.shadowRoot
      .querySelector('vaadin-grid')
      .shadowRoot.append(createVaadinGridStylePatchElement())
  }, 0)`
rachelbt commented 2 years ago

For vivids: there are actually 2 issues that are causing it:

  1. the TD has overflow-hidden that hides the select.
  2. each TR is positioned absolute - that causes a new layer stacking to each TR
agieralt commented 2 years ago

Thank you!! @rachelbt Looks promising, after changing both properties looks like this: image Do you know what I could do to prevent Selects from hiding opened lists?

yinonov commented 2 years ago

⚠️ meddling with the style may introduce other layout / styling bug

see openui/open-ui#443

rachelbt commented 2 years ago

Thank you!! @rachelbt Looks promising, after changing both properties looks like this: image Do you know what I could do to prevent Selects from hiding opened lists?

I wasn't suggesting a solution but pointing out the issue here when the bug will be tended :)