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

Table with dynamic number of rows #1

Open
olivercoad opened this issue May 8, 2023 · 1 comment
Open

Table with dynamic number of rows #1

olivercoad opened this issue May 8, 2023 · 1 comment

Comments

@olivercoad
Copy link

How do you add rows from a list? All the examples I can find have hard-coded rows.

I tried using a for-in loop but get the error `This control construct may only be used if the computation expression builder defines a 'For' method.

table {
  columns_text [| "test" |]
  for row in testRows do
    row_text [| row |]
}

Workaround is to make the table then use the C#-style .AddRow(row) method.

@galassie
Copy link
Owner

Hi @olivercoad
ATM unfortunately is not possible...
I was working on implement that for loop but without success...

I was planning to work on a new custom operation which adds multiple rows all in once!
Something like (note the s):

table {
  columns_text [| "test" |]
  rows_text  testRows
}

Otherwise if you already found a solution you can open a PR :)

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

No branches or pull requests

2 participants