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

ROU-4900: Issue with OnCellClick when reordering columns #416

Merged
merged 3 commits into from
May 21, 2024

Conversation

OS-giulianasilva
Copy link
Contributor

@OS-giulianasilva OS-giulianasilva commented May 20, 2024

This PR is for fixing the issue with OnCellClick when reordering columns and an issue with the dirty mark.

What was happening

  • When reordering the columns in a Grid with the OnCellClick event, and clicking on a cell to trigger the event, the outputted information did not correspond to the correct column. This occurred because, after reordering columns, the column index was updated on Wijmo's side, but it was not updated on the OutSystems side, which made the wrong column information be retrieved and sent to the OnCellClick event.
  • In a Grid with two columns with the same binding (the first is a Text Column and the second an Action Column), when editing the Text Column, it does not present the dirty mark. This occurred because, when using the Grid.getColumn() with the binding as a parameter in the _isDirtyCell() method, it returned the element corresponding to the associated key. However, when two columns have the same binding, just one of them is mapped to the binding in the AbstractGrid._columns Map object.

What was done

  • To fix both issues, we now use the describedById Wijmo's Column property describedById to store the Column's uniqueId instead of using the binding or column index.

Screenshots

  • Column reorder issue:

    • Before:
      gif8
    • After:
      gif9
  • DirtyMark issue:

    • Before:
      gif7
    • After:
      gif10

Checklist

  • tested locally
  • documented the code
  • clean all warnings and errors of eslint
  • requires changes in OutSystems (if so, provide a module with changes)
  • requires new sample page in OutSystems (if so, provide a module with changes)

@OS-giulianasilva OS-giulianasilva requested a review from a team as a code owner May 20, 2024 11:24
@outsystemsbot outsystemsbot bot added the cla:yes This code submission conforms with the OutSystems CLA or the CLA is not required for this PR label May 20, 2024
Copy link

sonarcloud bot commented May 20, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@OS-giulianasilva OS-giulianasilva changed the title Rou 4900 ROU-4900: Issue with OnCellClick when reordering columns May 20, 2024
@OS-giulianasilva OS-giulianasilva merged commit 7622650 into dev May 21, 2024
14 checks passed
@OS-giulianasilva OS-giulianasilva deleted the ROU-4900 branch May 21, 2024 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla:yes This code submission conforms with the OutSystems CLA or the CLA is not required for this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants