primereact icon indicating copy to clipboard operation
primereact copied to clipboard

Button Label Text Overflow Issue with maxWidth

Open ddoemonn opened this issue 1 year ago • 0 comments

Describe the bug

When trying to set maxWidth to button and creating text overflow there is no ellipsis it's kinda edge case but I think Button should offer a nice UI even if user wants that (ex: maybe a dynamic button with fixed width).

Reproducer

https://stackblitz.com/edit/vitejs-vite-su2uss?file=src%2FApp.tsx

System Information

System:
    OS: macOS 15.0
    CPU: (8) arm64 Apple M2
    Memory: 234.48 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.9.0 - /opt/homebrew/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 10.8.3 - /opt/homebrew/bin/npm
    bun: 1.1.27 - ~/.bun/bin/bun
    Watchman: 2024.09.23.00 - /opt/homebrew/bin/watchman
  Browsers:
    Safari: 18.0
  npmPackages:
    react: 18.3.1 => 18.3.1

Steps to reproduce the behavior

Go to stackblitz repo and you can clearly see the error.

Expected behavior

There should be text-overflow value for button label for this case

ddoemonn avatar Sep 30 '24 16:09 ddoemonn