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

Add the ability to insert/remove records from LocalListDataStore by index #900

Closed
howudodat opened this issue Dec 20, 2023 · 0 comments
Closed
Assignees
Labels
enhancement New feature or request version 2.x.x Version 2.x.x issues
Milestone

Comments

@howudodat
Copy link

Please provide a way to insert a record to the data store, when a user adds a new row to the table, if the table is long, it's nice to have the new record at the top.

/**
  * Inserts a single record to the data store, updating both the original and filtered lists.
  *
  * @param record The record to be inserted.
  */
 public void insertRecord(T record) {
   original.add(0, record);
   List<T> newData = new ArrayList<>(original);
   setData(newData);
 }

or as an alternative:
public void addRecord(int index, T record)

@vegegoku vegegoku modified the milestone: 2.0.0-RC5 Jan 14, 2024
@vegegoku vegegoku self-assigned this Jan 14, 2024
@vegegoku vegegoku added the enhancement New feature or request label Jan 14, 2024
@vegegoku vegegoku added this to the 2.0.0 milestone Jan 14, 2024
@vegegoku vegegoku changed the title LocalListDataStore allow insert of record Add the ability to insert/remove records from LocalListDataStore by index Jan 14, 2024
vegegoku added a commit that referenced this issue Jan 14, 2024
@vegegoku vegegoku added the version 2.x.x Version 2.x.x issues label Jan 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request version 2.x.x Version 2.x.x issues
Projects
Status: Done
Development

No branches or pull requests

2 participants