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

[feature] reset, empty rows #446

Open
dawadam opened this issue Mar 25, 2023 · 6 comments
Open

[feature] reset, empty rows #446

dawadam opened this issue Mar 25, 2023 · 6 comments
Labels
enhancement New feature or request

Comments

@dawadam
Copy link

dawadam commented Mar 25, 2023

Hi, thanks for great job.
Is it possible to reset, empty rows ?
For making a dynamic array.

@ayonious
Copy link
Owner

Could you set an example with image? @dawadam

@dawadam
Copy link
Author

dawadam commented Mar 29, 2023

Ok, but i don't have image.
Just if i take the basic exemple and i want to display and update content, like this :

const { printTable } = require('console-table-printer');

//Create a table
const testCases = [
  { index: 3, text: 'I would like some gelb bananen bitte', value: 100 },
  { index: 4, text: 'I hope batch update is working', value: 300 },
];

//print
printTable(testCases);

// waiting time (exemple fetch data on internet)
await delay(1000)

const testCases_v2 = [
  { index: 5, text: 'I would like update data !', value: 123 }
];

//print
printTable(testCases_v2);

Table can't be updated.

@ayonious
Copy link
Owner

ayonious commented Apr 2, 2023

@dawadam for that reason you can create a Table instance like this and add as much content possible.
https://console-table.netlify.app/docs/doc-table-instance-creation

@dawadam
Copy link
Author

dawadam commented Apr 2, 2023

Ok, i see.
But if i want to update or remove data from the Table ?

@ayonious
Copy link
Owner

ayonious commented Apr 4, 2023

True! that feature is not there.

The primary goal of this This package is printing objects.
Features related to changing/updating data is Optional
Having many features to manipulate data makes this package a Database/storage for which there are other packages.

But if this feature is requested by more people I will priotize it.

@ayonious ayonious added the enhancement New feature or request label Jul 2, 2023
@antofa
Copy link

antofa commented Apr 8, 2024

+1

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

No branches or pull requests

3 participants