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

Datagrid: Changing the selectable value does not take effect #4575

Closed
claudenbach opened this issue Nov 4, 2020 · 3 comments · Fixed by #4577
Closed

Datagrid: Changing the selectable value does not take effect #4575

claudenbach opened this issue Nov 4, 2020 · 3 comments · Fixed by #4577
Assignees
Labels
team: landmark For Landmark issues type: bug 🐛 [3] Velocity rating (Fibonacci)

Comments

@claudenbach
Copy link
Contributor

claudenbach commented Nov 4, 2020

Describe the bug
Changing a datagrid's selectable option doesn't take effect. After changing the selectable value, when the user clicks on a cell in the datagrid, the incorrect event is being fired. The selectable value has not been updated.

Steps to reproduce the behavior
Attempt to change a datagrid's selectable value using either of the following did not work:

this.sohoDataGridComponent.selectable = selectionMode;
or
this.sohoDataGridComponent.selectable(selectionMode);

Looking at the coding for setting the selectable value....

  @Input() set selectable(selectable: any) {
      this._gridOptions.selectable = selectable;
      if (this.jQueryElement) {
        // Just changing the datagrid.settings.selectable updates the datagrid view.
        this.datagrid.settings.selectable = selectable;
        this.markForRefresh('selectable', RefreshHintFlags.RenderRows);
      }
    } 

Probably need to get together to show/resolve.

Expected behavior
The selectable value is changed from 'single' to 'mixed'. When a cell in the datagrid is clicked, its firing a row selection event, but it should be firing a row activation event.

Version
Needed in Enterprise 4.35.x

Is related to Git #4573.

@claudenbach
Copy link
Contributor Author

Git-4575

@claudenbach claudenbach changed the title Datagrid: changing the selectable value does not take effect Datagrid: Changing the selectable value does not take effect Nov 4, 2020
@tmcconechy tmcconechy added the [3] Velocity rating (Fibonacci) label Nov 4, 2020
@tmcconechy tmcconechy added this to To do in Enterprise 4.35.x (Nov 2020) Sprint via automation Nov 4, 2020
@tmcconechy
Copy link
Member

I can reproduce (and ultimately fix this in EP). It looks like this variable https://github.com/infor-design/enterprise/blob/master/src/components/datagrid/datagrid.js#L8421 is only set on startup. We could check this every time before firing the event.

Also probably could work by changing RefreshHintFlags to reload

@tmcconechy tmcconechy self-assigned this Nov 4, 2020
@tmcconechy tmcconechy moved this from To do to In progress in Enterprise 4.35.x (Nov 2020) Sprint Nov 4, 2020
@tmcconechy tmcconechy moved this from In progress to Pending Review in Enterprise 4.35.x (Nov 2020) Sprint Nov 4, 2020
@tmcconechy tmcconechy moved this from Pending Review to Ready for QA (beta) in Enterprise 4.35.x (Nov 2020) Sprint Nov 10, 2020
@janahintal
Copy link
Contributor

This issue is now resolved. Thank you.

@janahintal janahintal moved this from Ready for QA (beta) to Done in Enterprise 4.35.x (Nov 2020) Sprint Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team: landmark For Landmark issues type: bug 🐛 [3] Velocity rating (Fibonacci)
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

3 participants