KevinVandy / mantine-react-table

A fully featured Mantine V5 implementation of TanStack React Table V8, forked from Material React Table
https://www.mantine-react-table.com/
MIT License
859 stars 146 forks source link

Mantine React Table Icons background color issues #428

Open HxnDev opened 1 week ago

HxnDev commented 1 week ago

mantine-react-table version

v2.0.0-beta.5

react & react-dom versions

v18.3.1

Describe the bug and the steps to reproduce it

I am using Mantine React Tables and everything is good. However, I enabled the sorting and filtering options of my table and then the sort icon (arrows) starting showing up with the green background color (which is the products primary color). I keep trying to set the background as transparent, but nothing works.

image

The inspect element shows the following:

image

-> On the element.style window in inspect. i can see the primary color being assigned to the background, but if i put the same classname (.m_8d3f4000) in code to remove background, it does nothing.

image

Minimal, Reproducible Example - (Optional, but Recommended)


const Table = () => {
  const table = useMantineReactTable({
    columns,
    data: rowData,
    enableSorting: true,
  })
  return table
}

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

None

Terms

alessandrojcm commented 2 days ago

Hi, I believe this was fixed, can you try the latest beta and confirm please?

HxnDev commented 2 days ago

Hi, I believe this was fixed, can you try the latest beta and confirm please?

Hello @alessandrojcm

I updated to version 2-beta7, but the error still persists:

image

image

const columns = useMemo<MRT_ColumnDef<ContributionItems>[]>(
    () => [
      {
        accessorKey: 'project.name',
        header: 'Project Name',
        Cell: ({ cell }) => {
          const project_name = cell.getValue<string>() || 'N/A'
          return <TruncatedTextWithTooltip text={project_name} />
        },
      },
      {
        accessorKey: 'project.location.countryName',
        header: 'Country',
        Cell: ({ cell }) => {
          const country = cell.getValue<string>() || 'N/A'
          return <TruncatedTextWithTooltip text={country} />
        },
      },
const table = useMantineReactTable({
    columns,
    data: rowData,
    rowCount: totalRowCount,
    pageCount: Math.ceil(totalRowCount / pagination.pageSize),
    enablePagination: false,
    enableGlobalFilter: false,
    mantineToolbarAlertBannerProps: error
      ? {
          color: 'red',
          children: error.message,
        }
      : undefined,
    state: {
      isLoading: loading,
      showAlertBanner: !!error,
      showSkeletons: false,
      pagination,
    },
    onPaginationChange: (newPagination) => {
      if (typeof newPagination === 'function') {
        setPagination((prevPagination) => newPagination(prevPagination))
      } else {
        setPagination(newPagination)
      }
    },
  })