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 bug where cell value is repeated from other cell when a column is added #263

Merged
merged 1 commit into from
Mar 23, 2021

Conversation

timbze
Copy link
Contributor

@timbze timbze commented Mar 22, 2021

Here's how to reproduce the bug that this PR fixes:

  1. Have grid with 3 columns, but column 1 is disabled like this:
if (showColumnOne)
{
    c.Add("SelectColumn")
        .SetCheckboxColumn(true, _ => false);
}

c.Add(i => i.Description)
    .Titled("Desc");

c.Add(i => i.Notes)
    .RenderComponentAs<TooltipForGrid>(new TooltipForGrid.TooltipOptions(text.Invoke, lengthToDisplay, tooltipPlacement))
    .Titled("Notes");
  1. Load the grid with showColumnOne = false -- Data row 1 is "text1" for Description, "text2" for Notes.
  2. Load the grid again, now with showColumnOne = true -- Data row 1 is null for Description, "text3" for Notes.
  3. Description now shows "text2", but it should be null for row 1.

@gustavnavar gustavnavar merged commit 44eabe0 into gustavnavar:master Mar 23, 2021
@gustavnavar
Copy link
Owner

Package 2.1.13 includes this fix. Thanks!

@timbze timbze deleted the bugfix/cell_wrong_value branch April 20, 2021 17:04
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.

2 participants