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

"Convert to HTML Table" Does Not Add the "Row Attributes" Option #9428

Closed
MarleTangible opened this issue May 16, 2024 · 2 comments
Closed
Labels

Comments

@MarleTangible
Copy link

Bug Description

When converting data to HTML, the row attributes option is ignored. Looks like Html.node.ts defines the variable as rowAttributes (singular) but it's referenced as rowsAttributes in plural form.

displayName: 'Row Attributes',
name: 'rowAttributes',
type: 'string',
default: '',
description: 'Attributes to attach to the table row',
placeholder: 'e.g. style="padding:10px"',

const rowsAttributes = this.getNodeParameter(
'options.rowsAttributes',
entryIndex,
'',
) as string;
table += `<tr ${rowsAttributes}>`;

And as a side request, would it be possible to also add headerCellAttributes and headerRowAttributes as well?

To Reproduce

  1. Add sample JSON data.
  2. Use HTML node to convert to html table.
  3. Enable custom styling and add row attributes.
  4. Output does not include the row styling.

Expected behavior

HTML node to add "row attributes" to the output data.

Operating System

Debian Bookworm

n8n Version

1.39.1

Node.js Version

18.19.1

Database

SQLite (default)

Execution mode

main (default)

@Joffcom
Copy link
Member

Joffcom commented May 17, 2024

Hey @MarleTangible,

Thanks for the report, I have put in a PR to fix this which once reviewed and merged will be available in a future release. With the feature request I have made a note of them internally and if we do an overhaul of the node in the future we can look at adding those.

@janober
Copy link
Member

janober commented May 22, 2024

Fix got released with n8n@1.43.0

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

No branches or pull requests

3 participants