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

console_table operation #125

Merged
merged 1 commit into from
May 15, 2021
Merged

Conversation

leastbad
Copy link
Contributor

Implements https://developer.mozilla.org/en-US/docs/Web/API/Console/table as an operation.

Options:

  • data
  • columns

Anything passed to data is sent into the table. It expects an array or object, but fails very gracefully.
Columns defaults to [] and must be an array of strings if passed.

cable_ready.console_table(data: [{marco: 5, nate: 2}, {marco:4, nate: 6}], columns: ['marco']).broadcast

chrome_1JoQAFw3hE

Thanks to @MatheusRich for the idea!

@leastbad leastbad added enhancement proposal javascript Pull requests that update Javascript code labels May 15, 2021
Copy link
Contributor

@hopsoft hopsoft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it

@leastbad leastbad merged commit 247e09f into stimulusreflex:master May 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement javascript Pull requests that update Javascript code proposal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants