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

SplitButton: pt attribute doesn't behave as described in documentation #4883

Closed
dominikj111 opened this issue Sep 6, 2023 · 4 comments · Fixed by #5406
Closed

SplitButton: pt attribute doesn't behave as described in documentation #4883

dominikj111 opened this issue Sep 6, 2023 · 4 comments · Fixed by #5406
Assignees
Labels
Component: Documentation Issue or pull request is related to Documentation
Milestone

Comments

@dominikj111
Copy link

Describe the bug

SplitButton wireframe shows that number 2 and 3 are labeled as icon and button and it doesn't match the options table.

So the

<SplitButton
   label="This is button (3)"
   onClick={save}
   model={items}
   pt={{
      // 3 in doc, but 2 in reality
      button: { root: { style: { backgroundColor: "black" } } },
      // 2 in doc, but 3 in reality
      icon: { style: { backgroundColor: "red" } }
   }}
/>

colours the opposite sections.

Also the passed pt structure is quite inconsistent. I'm wondering if there is any purpose for this.

Reproducer

https://codesandbox.io/s/primereact-demo-forked-dkrktv?file=/src/App.js

PrimeReact version

9.6.2

React version

18.x

Language

TypeScript

Build / Runtime

Create React App (CRA)

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

@dominikj111 dominikj111 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Sep 6, 2023
@melloware melloware added Component: Documentation Issue or pull request is related to Documentation and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Sep 6, 2023
@melloware
Copy link
Member

@dominikj111 so the wireframe is the only thing wrong correct?

@dominikj111
Copy link
Author

The most easy fix would by to swap 2 and 3 in the wireframe. So I suppose I can give you positive answer @melloware, from that point of view.

But from my perspective, the wireframe is correct but in table row the icon (2) needs to swap with the the button (3). For me the most confusing thing are the labels. Both items are buttons, but one is marked as icon and both accepts different passthrough type.

@melloware
Copy link
Member

OK let me assign this to PrimeTek.

@melloware melloware added this to the 11.0.0 milestone Sep 7, 2023
@melloware
Copy link
Member

Docs have been updated: https://primereact.org/splitbutton/

@melloware melloware closed this as not planned Won't fix, can't repro, duplicate, stale Nov 26, 2023
@melloware melloware modified the milestones: 11.0.0, 10.2.0, 10.1.1 Nov 26, 2023
@melloware melloware self-assigned this Nov 26, 2023
@melloware melloware reopened this Nov 26, 2023
@github-actions github-actions bot added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Nov 26, 2023
melloware added a commit to melloware/primereact that referenced this issue Nov 26, 2023
@melloware melloware removed the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Nov 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Documentation Issue or pull request is related to Documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants