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

Documentation request: Is the index property required? #456

Closed
DanKaplanSES opened this issue Dec 13, 2023 · 4 comments
Closed

Documentation request: Is the index property required? #456

DanKaplanSES opened this issue Dec 13, 2023 · 4 comments

Comments

@DanKaplanSES
Copy link
Contributor

DanKaplanSES commented Dec 13, 2023

After looking at most of the examples, I don't think an index column is required, but the majority of the documentation has a column by that name, including every example on the Adding Rows page. If this column isn't required, I think this is the place to say it. Otherwise, it's implied that it must be manually set by the user.

@ayonious
Copy link
Owner

hi @DanKaplanSES index is not required. You can try out yourself. Here are other examples of this:

https://console-table.netlify.app/docs/doc-computed-function
https://console-table.netlify.app/docs/doc-emojis-special-chars

@ayonious
Copy link
Owner

but I see your point and yes its a better example without using this particular name, which can imply something like this.

@DanKaplanSES
Copy link
Contributor Author

but I see your point and yes its a better example without using this particular name, which can imply something like this.

Great! Thank you for considering this.

I'd like to add some additional context that may be unnecessary, but might explain how I came to my assumption: I found this library because console.table() lacked some features I wanted.

Incidentally, console.table() automatically includes an index column in its output. Because many console-table-printer examples manually include a column with the same name, I thought the console-table-printer index column may be required as an enhancement to console.table(), allowing you to specify an index separate from insertion order.

I want to reiterate I (now) understand that is not the case, but I thought it might help to shed some insight into my thought process.

Thanks again!

@ayonious ayonious mentioned this issue Dec 21, 2023
2 tasks
@ayonious
Copy link
Owner

I have updated some docs to make it more clear that index is not needed. Feel free to open it up again if needed

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