palantir/blueprint

Styling bug with bordered HTMLTable with cells that span multiple rows

Open

#6330 aperta il 25 ago 2023

Vedi su GitHub
 (2 commenti) (0 reazioni) (0 assegnatari)TypeScript (2167 fork)batch import
Domain: designP3Package: coreType: bughelp wanted

Metriche repository

Star
 (20.263 star)
Metriche merge PR
 (Merge medio 43g 10h) (27 PR mergiate in 30 g)

Descrizione

Environment

  • Package version(s): 5.2.0
  • Browser name and version: Chrome 116.0.5845.96

Code Sandbox

Link to a minimal repro (fork this code sandbox):

<HTMLTable bordere>
          <thead>
            <tr>
              <th></th>
              <th>Team Performance Metric</th>
              <th>{homeTeam}</th>
              <th>{awayTeam}</th>
            </tr>
          </thead>
          <tbody>
            {data.map((d) =>
              d.stats.map((stat, j) => (
                <tr key={stat.statName}>
                  {j === 0 ? (
                    <td rowSpan={d.stats.length}>
                      <span>{d.text}</span>
                    </td>
                  ) : null}
                  <td>
                    <span>{stat.statName}</span>
                  </td>
                  <td>
                    <div>
                      {stat.homeStat || '-'}
                    </div>
                  </td>
                  <td>
                    <div>
                      {stat.awayStat || '-'}
                    </div>
                  </td>
                </tr>
              ))
            )}
          </tbody>
        </HTMLTable>

Steps to reproduce

  1. try out code that I post above. data inside of it doesn't matter

Actual behavior

Table looks like this, seems like the bordered prop is broken

Expected behavior

Expect to see smth like this image

Guida contributor