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

Mantine React Table Icons background color issues #428

Open
1 task done
HxnDev opened this issue Oct 28, 2024 · 2 comments
Open
1 task done

Mantine React Table Icons background color issues #428

HxnDev opened this issue Oct 28, 2024 · 2 comments

Comments

@HxnDev
Copy link

HxnDev commented Oct 28, 2024

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

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
@alessandrojcm
Copy link
Collaborator

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

@HxnDev
Copy link
Author

HxnDev commented Nov 4, 2024

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)
      }
    },
  })

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

2 participants