nextui icon indicating copy to clipboard operation
nextui copied to clipboard

[BUG] - Table: minWidth and other column props not recognized

Open stx-chris opened this issue 2 years ago • 16 comments

NextUI Version

2.1.13

Describe the bug

Some of the column properties, e.g. minWidth, are not applied

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

Apply any value for minWidth

Expected behavior

Property should be applied to styles

Screenshots or Videos

No response

Operating System Version

macOS

Browser

Chrome

stx-chris avatar Sep 21 '23 09:09 stx-chris

align doesn't work either. Can you add that detail to this bug? 🙏

EtherealData avatar Jan 15 '24 04:01 EtherealData

TableColumn properties (align, width, maxWidth...) are not working here neither.

Version:

"@nextui-org/react": "^2.2.9",
"next": "14.0.4",

LagoonProject avatar Feb 20 '24 18:02 LagoonProject

TableColumn properties (align, width, maxWidth...) are not working here neither.

Version:

"@nextui-org/react": "^2.2.9",
"next": "14.0.4",

.

duchoan6814 avatar Feb 22 '24 09:02 duchoan6814

TableColumn properties (align, width, maxWidth...) are not working here neither.

Version:

"@nextui-org/react": "^2.2.9",
"next": "14.0.4",

"next": "^14.1.0", "@nextui-org/react": "^2.2.9",

Same here. Work-arounding it by adding length to the column header name for now.

captainkapnap avatar Mar 13 '24 15:03 captainkapnap

Same here, doesn't even work in the examples in the docs:

code ui

kasulk avatar Mar 15 '24 10:03 kasulk

any news on this?

happydayxxl avatar Apr 02 '24 13:04 happydayxxl

I am having the same issue here. Are there any temporary workarounds available? I need to set the width and alignment of my column.

THE-SIMPLE-MARK avatar Apr 21 '24 19:04 THE-SIMPLE-MARK

I am having the same issue here. Are there any temporary workarounds available? I need to set the width and alignment of my column.

i have solved it with <TableColumn className='min-w-48'> .... i am using tailwind

happydayxxl avatar Apr 22 '24 05:04 happydayxxl

I am using tailwind as well and solved the alignment issue with the className "text-right"

ygd avatar Apr 24 '24 10:04 ygd

Any news about this issue?

PabloOliveiraSantos avatar May 29 '24 12:05 PabloOliveiraSantos

Any updates?

matteogilioli avatar Jul 10 '24 10:07 matteogilioli

You can try adding an element inside <TableColumn> and apply your desired styles to that element. This approach might achieve a similar effect.

<TableColumn ><div className="border border-dashed w-80">Name</div></TableColumn>

LeoLin4258 avatar Jul 11 '24 04:07 LeoLin4258

I am new to next-ui, even an autogenerated project via nextui init does not work properly. maxWidth and justify don't work in the Navbar of the autogenerated project.

Version: NextUI CLI v0.3.4

Edit:

my problem was that I initialized it in a monorepo, which broke everything. I fixed my issue with adding ../../ to node_modules path

module.exports = {
  content: [
    "./layouts/**/*.{js,ts,jsx,tsx,mdx}",
    "./pages/**/*.{js,ts,jsx,tsx,mdx}",
    "./components/**/*.{js,ts,jsx,tsx,mdx}",
    // IMPORTANT ../../ has to be done for monorepo
    "../../node_modules/@nextui-org/theme/dist/**/*.{js,ts,jsx,tsx}",
  ],
  theme: {
    extend: {
      maxWidth: {
        "8xl": "96rem",
      },
    },
  },
  darkMode: "class",
  plugins: [nextui()],
};

Ribosom avatar Aug 15 '24 16:08 Ribosom

I am using tailwind as well and solved the alignment issue with the className "text-right"

I am having the same issue here. Are there any temporary workarounds available? I need to set the width and alignment of my column.

i have solved it with <TableColumn className='min-w-48'> .... i am using tailwind

Of course you can solve it with tailwind. You can also solve it with css. You could just not use nextui at all and do everything on your own. But the point is that the nextui functionality that should work does not work, and should be fixed. Getting the solution that worked for you out is a good thing regardless, I'm not trying to be toxic here, but this is still an issue with nexui that needs to be dealt with.

rayaqin avatar Nov 30 '24 10:11 rayaqin

Still not fixed as of March 2025, 18 months since first reported...

awestm avatar Mar 03 '25 22:03 awestm