Skip to content

TableCell throws warnings on rowspan and colspan usage #4284

Open
@anandkumarpatel

Description

@anandkumarpatel

Before creating a new issue, please confirm:

On which framework/platform are you having an issue?

React

Which UI component?

Primitive components

How is your app built?

Create React App

What browsers are you seeing the problem on?

Chrome, Firefox, Microsoft Edge, Safari

Which region are you seeing the problem in?

No response

Please describe your bug.

Getting errors when trying to use Table with rowspan following the example here: https://ui.docs.amplify.aws/react/components/table#spanning-multiple-columns-or-rows

Warning: Invalid DOM property `rowspan`. Did you mean `rowSpan`?

The table renders correctly, but the errors in the console should not be there.

I tried changing to rowSpan but that does not merge the rows as rowspan does.

What's the expected behaviour?

The table renders without errors in the console

Help us reproduce the bug!

run this example: https://ui.docs.amplify.aws/react/components/table#spanning-multiple-columns-or-rows

Code Snippet

import { Table, TableBody, TableCell, TableRow } from '@aws-amplify/ui-react';

export const SpanExample = () => (
  <Table variation="bordered">
    <TableBody>
      <TableRow>
        <TableCell />
        <TableCell />
        <TableCell
          colspan="2"
        />
      </TableRow>
      <TableRow>
        <TableCell
          rowspan="3"
        />
        <TableCell />
        <TableCell />
        <TableCell
          rowspan="3"
        />
      </TableRow>
      <TableRow>
        <TableCell />
        <TableCell />
      </TableRow>
      <TableRow>
        <TableCell
          colspan="3"
        />
      </TableRow>
    </TableBody>
  </Table>
);

Console log output

Warning: Invalid DOM property `rowspan`. Did you mean `rowSpan`?
    at td
    at http://localhost:3006/static/js/bundle.js:244087:11
    at http://localhost:3006/static/js/bundle.js:243601:11
    at tr
    at http://localhost:3006/static/js/bundle.js:244087:11
    at http://localhost:3006/static/js/bundle.js:243678:17
    at tbody
    at http://localhost:3006/static/js/bundle.js:244087:11
    at http://localhost:3006/static/js/bundle.js:243563:17
    at table

Additional information and screenshots

"@aws-amplify/ui-react": 5.0.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    PrimitiveAn issue or a feature-request for one or more UI PrimitiveReactAn issue or a feature-request for React platformbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions