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

feat: add option to cancel Row Detail opening #1125

Merged
merged 1 commit into from
Oct 4, 2023

Conversation

ghiscoding
Copy link
Owner

  • user can now prevent event and return false on onBeforeRowDetailToggle event to cancel opening certain Row Detail, for example the code below would block opening Row Detail when its id is 1
detailView.onBeforeRowDetailToggle.subscribe(function(e, args) {
  // you coud cancel opening certain rows
  if (args.item.id === 1) {
    e.preventDefault();
    return false;
  }
  console.log('before toggling row detail', args.item);
});

Code_OXS6TTs2AJ

- user can now prevent event and return false on `onBeforeRowDetailToggle` event to cancel opening certain Row Detail, for example the code below would block opening Row Detail when its id is `1`
@codecov
Copy link

codecov bot commented Oct 4, 2023

Codecov Report

Merging #1125 (77f08e5) into master (fdc79a8) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master     #1125   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          245       245           
  Lines        16846     16847    +1     
  Branches      6044      6045    +1     
=========================================
+ Hits         16846     16847    +1     
Files Coverage Δ
...s/row-detail-view-plugin/src/slickRowDetailView.ts 100.00% <100.00%> (ø)

@ghiscoding ghiscoding merged commit 82ba377 into master Oct 4, 2023
5 checks passed
@ghiscoding ghiscoding deleted the bugfix/row-detail-cancel-open branch October 4, 2023 01:25
ghiscoding added a commit that referenced this pull request Oct 5, 2023
ghiscoding added a commit that referenced this pull request Oct 5, 2023
ghiscoding added a commit that referenced this pull request Dec 27, 2023
- I tried to implement this feature in a previous PR #1125 but that introduced a regression which is got fixed in this PR and reintroduces this feature without regressing this time.
ghiscoding added a commit that referenced this pull request Dec 27, 2023
* feat: (re)add option to cancel Row Detail opening
- I tried to implement this feature in a previous PR #1125 but that introduced a regression which is got fixed in this PR and reintroduces this feature without regressing this time.
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.

None yet

1 participant