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

Support for <tfoot> in <HTMLTable> #4598

Closed
saruman1234 opened this issue Mar 19, 2021 · 0 comments · Fixed by #4674
Closed

Support for <tfoot> in <HTMLTable> #4598

saruman1234 opened this issue Mar 19, 2021 · 0 comments · Fixed by #4674

Comments

@saruman1234
Copy link

Environment

  • Package version(s): @blueprintjs/core@3.41.0

Feature request

Support using <tfoot> for table footer inside <HTMLTable> (along with bordered, striped, interactive variants) by adding the missing borders and/or background color.

  • There are currently styles for <thead>, but not <tfoot>.
  • This would be useful for aggregate/summary values like column totals.
  • Can be done as custom CSS, but feels like something that could be supported by the package.

Example of current appearance (missing both vertical and horizontal borders)

image

Example TSX

import React from "react";
import { HTMLTable } from "@blueprintjs/core";

const Example = () => {
  return (
    <HTMLTable bordered striped>
      <thead>
        <tr>
          <th>Item</th>
          <th>Color</th>
          <th>Amount</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td>Laptop</td>
          <td>Silver</td>
          <td>$125</td>
        </tr>
        <tr>
          <td>Phone</td>
          <td>Black</td>
          <td>$225</td>
        </tr>
      </tbody>
      <tfoot>
        <tr>
          <td colSpan={2}></td>
          <td>$350</td>
        </tr>
      </tfoot>
    </HTMLTable>
  );
};

export default Example;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants