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

fix(collectionAsync): hidden column does not load edit field selection #742

Merged
merged 3 commits into from Aug 15, 2022

Conversation

mcallegario
Copy link
Contributor

Bug: Hidden column does not load edit field with selection options

The "this.slickGrid.getColumns()" method only returns the visible fields of the grid, so if the field that was configured to return a list of elements (collectionAsync) is hidden in the grid, it does not receive the list of elements.

note: Unfortunately after version 1.3.x I am no longer able to perform the "pnpm run build".
image

@ghiscoding
Copy link
Owner

ghiscoding commented Aug 11, 2022

yeah don't use the build (which is meant for something else), use the bundle instead which will delete all previous dist folders and avoid the problem you're seeing

@@ -1434,7 +1434,7 @@ export class SlickVanillaGridBundle {

if (this.slickGrid) {
// find the new column reference pointer & re-assign the new editor to the internalColumnEditor
const columns = this.slickGrid.getColumns();
const columns = this.columnDefinitions;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove this line and apply it directly as shown below

- const columns = this.columnDefinitions;
if (Array.isArray(columns)) {
-        const columnRef = columns.find((col: Column) => col.id === column.id);
+        const columnRef = this.columnDefinitions.find((col: Column) => col.id === column.id);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to remove the "const columns" I also have to change the "if" list. Is it good like this?

image

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that seems correct, are you going to be able to fix the unit tests or do you need help? Please don't comment out the unit tests, we need to keep track of them and not forget them please :)

@codecov
Copy link

codecov bot commented Aug 12, 2022

Codecov Report

Merging #742 (ffc1a36) into master (c8acb65) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master      #742   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          233       233           
  Lines        16437     16439    +2     
  Branches      5490      5490           
=========================================
+ Hits         16437     16439    +2     
Impacted Files Coverage Δ
...bundle/src/components/slick-vanilla-grid-bundle.ts 100.00% <100.00%> (ø)
packages/common/src/editors/sliderEditor.ts 100.00% <0.00%> (ø)
packages/common/src/filters/sliderFilter.ts 100.00% <0.00%> (ø)
packages/common/src/extensions/extensionUtility.ts 100.00% <0.00%> (ø)
...ackages/common/src/filters/compoundSliderFilter.ts 100.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

ghiscoding added a commit to ghiscoding/aurelia-slickgrid that referenced this pull request Aug 13, 2022
ghiscoding added a commit to ghiscoding/Angular-Slickgrid that referenced this pull request Aug 13, 2022
@ghiscoding ghiscoding merged commit 763c61c into ghiscoding:master Aug 15, 2022
ghiscoding added a commit to ghiscoding/aurelia-slickgrid that referenced this pull request Aug 15, 2022
ghiscoding added a commit to ghiscoding/Angular-Slickgrid that referenced this pull request Aug 15, 2022
ghiscoding added a commit to ghiscoding/aurelia-slickgrid that referenced this pull request Aug 15, 2022
#855)

* fix(collectionAsync): hidden column does not load edit field selection
- replicate issue found and fixed in Slickgrid-Universal [PR 742](ghiscoding/slickgrid-universal#742)
@ghiscoding
Copy link
Owner

ghiscoding commented Aug 16, 2022

@mcallegario
Thanks for the PR, this was released under new version v1.4.0, thanks again for the contribution 😉

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

2 participants