nextui-org / nextui

🚀 Beautiful, fast and modern React UI library.
https://nextui.org
MIT License
21.9k stars 1.52k forks source link

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

Open stx-chris opened 1 year ago

stx-chris commented 1 year ago

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

EtherealData commented 9 months ago

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

LagoonProject commented 8 months ago

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

Version:

"@nextui-org/react": "^2.2.9",
"next": "14.0.4",
duchoan6814 commented 8 months ago

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

Version:

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

.

captainkapnap commented 7 months ago

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.

kasulk commented 7 months ago

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

code ui

happydayxxl commented 7 months ago

any news on this?

THE-SIMPLE-MARK commented 6 months ago

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

happydayxxl commented 6 months ago

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

ygd commented 6 months ago

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

PabloOliveiraSantos commented 5 months ago

Any news about this issue?

matteogilioli commented 3 months ago

Any updates?

LeoLin4258 commented 3 months ago

You can try adding an element inside 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>
Ribosom commented 2 months ago

I am new to next-ui, even an autogenerated project via nextui init does not work properly. maxWidthand 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()],
};