Skip to content

fix: 4457 Find or Select by Row Entity's 'ID' #7186

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

Merged
merged 8 commits into from
Dec 7, 2021

Conversation

prx-lmo
Copy link
Contributor

@prx-lmo prx-lmo commented Oct 20, 2021

  • fixes Find or Select by Row Entity's 'ID' #4457
  • I added find and select
  • not just in entity but also in row object itself
  • I can't guess what the id field of the user really is written, so after all keys can be searched
  • new getter functions: getRowsByKey and findRowByKey (find returns only the first row which is more performant, User is responsible that this field is unique)
  • new selector functions: selectRowByKey and unSelectRowByKey, they both use findRowByKey
  • all of them need following arguments:
    • isInEntity(boolean) toggles between row and entity object
    • key(string or number) the specific key to the value
    • comparator(any) the specific value, can be anything
    • lookInRows(Array)(optional) same as in getRow(), search this instead of grid.rows

 - added methods: getRowsByKey, findRowByKey, selectRowByKey, unSelectRowByKey
 - performance improvement
 - unit tests the getters and selectors
@commit-lint
Copy link

commit-lint bot commented Oct 20, 2021

Contributors

prx-lmo, mportuga

Commit-Lint commands

You can trigger Commit-Lint actions by commenting on this PR:

  • @Commit-Lint merge patch will merge dependabot PR on "patch" versions (X.X.Y - Y change)
  • @Commit-Lint merge minor will merge dependabot PR on "minor" versions (X.Y.Y - Y change)
  • @Commit-Lint merge major will merge dependabot PR on "major" versions (Y.Y.Y - Y change)
  • @Commit-Lint merge disable will desactivate merge dependabot PR
  • @Commit-Lint review will approve dependabot PR
  • @Commit-Lint stop review will stop approve dependabot PR

- easified unittest check

- unittest corrections

- corrected unit test array check

- fixed getting not existing object

- fixed selection unit test error

get fix
selection test

getter fix
selection test

fix getter
fix selection

fixed selection

fix lint error

selection test

void 0 check

selection test
mportuga
mportuga previously approved these changes Dec 6, 2021
@mportuga mportuga merged commit 7a0a6c6 into angular-ui:master Dec 7, 2021
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

Successfully merging this pull request may close these issues.

Find or Select by Row Entity's 'ID'
2 participants