Skip to content
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

CSS is overriden by something (row class) #638

Open
riksnelders opened this issue Jan 29, 2025 · 0 comments
Open

CSS is overriden by something (row class) #638

riksnelders opened this issue Jan 29, 2025 · 0 comments

Comments

@riksnelders
Copy link

Trying to add a row class based on a row value.

Using /deep/ .ve-table .ve-table-body-tr:has(.active)

works, is applied (shows in dev tools) But does not render the table row with given color.

Did I miss something in the docs?

 <ve-table
        ref="tableRef"
        :max-height="600"
        :height="200"
        :fixed-header="true"
        :expand-option="expandOption"
        row-key-field-name="sequence"
        :virtual-scroll-option="virtualScrollOption"
        :columns="getColumns"
        :row-class-name="getRowClass"
        :sort-option="sortOption"
        :scroll-width="'80vw'"
        :cellSelectionOption="cellSelectionOption"
        :cell-style-option="cellStyleOption"
        :border-y="true"
        :row-style-option="rowStyleOption"
        :table-data="products"/>
  </div>
 virtualScrollOption: {
        enable: false,
      },
      rowStyleOption: {
        stripe: true,
        clickHighlight: true,
        hoverHighlight: true,
      },
      cellSelectionOption: {
        enable: false,
      },
      cellStyleOption: {
        bodyCell: ({ row }) => ({
          backgroundColor: row.isrunning ? 'lightblue' : ''
        })
      },
      expandOption: {
        trigger: "cell",
        expandable: ({row, column, rowIndex}) => {
          return !this.fullscreen
          // if (row["comment"].length > 0) {
          //   return true;
          // }
          // return false
        },
        render: ({row, column, rowIndex}, h) => {
          return <SubProductTable columnWidth={this.columnWidths} index={rowIndex} row={row}/>;
        },
      },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant