mui / mui/material-ui

[joy-ui][Accordion] First/Last style problems

Open
#40,548 2 comments 0 reactions 1 assignee View on GitHub

@siriwatknp is already working on this.

Since Jan 12, 2024.

on hold package: joy-ui scope: accordion
Dominant language
JavaScript
Stars
99.1k
Forks
32.5k
Avg merge
2d 17h
Merged PRs (30d)
106

Description

Steps to reproduce

Link to live example: https://codesandbox.io/p/sandbox/joyui-accordion-first-last-6k8zvz

Steps:

  1. Create an rounded AccordionGroup with Accordions inside
  2. Replace Accordions components with Custom components wrapping Accordions
  3. Or add conditions around the first or last accordion that return "false" or "null" if falsy
Current behavior

The first and last Accordion items are not set properly (data-first-child and data-last-child are not set).

While hovered, first's/last's backgrounds overlap with the border. And the last child is displaying an extra border.

image

Expected behavior

Same style as normal use.

Context

Using the latest version of JoyUI (5.0.0-beta.22)

Found this maybe-related issue: https://github.com/mui/material-ui/issues/40272

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.