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

insert(rowFormer:below:) on SectionFormer inserts wrong rowformer #104

Open
goranche opened this issue Nov 30, 2019 · 0 comments
Open

insert(rowFormer:below:) on SectionFormer inserts wrong rowformer #104

goranche opened this issue Nov 30, 2019 · 0 comments

Comments

@goranche
Copy link

Describe the bug
I'm trying to add a new row to a section in my setup code, and noticed the row not showing up, although a cell was obviously present.
Coding with tagged version 1.8.0

To Reproduce
Steps to reproduce the behavior:

  1. enter code:
let section = SectionFormer(rowFormers: [someRow])
section.insert(rowFormer: someOtherRow, below: someRow)
former.add(sectionFormers: [section])
  1. Run the code

Expected behavior
2 shown rows, one someRow and one someOtherRow

Desktop (please complete the following information):

  • OS: macOS Catalina

Smartphone (please complete the following information):

  • Device: Simulator
  • OS: iOS 13.*

Additional context
In file SectionFormer.swift, line 98 the rowFormer from the enumeration is inserted into the existing array, not the passed argument.

Rather worryingly, in line 102 of the same file, rowFormers is added, but since it's not a passed variable, the private var is taken, effectively duplicating it's content.

Similar issues (not tested) can be observed in line 111, where the enumerated row is added instead of the passed array of rows.
Elsewhere in the same file the same issue can be found in multiple places, not going to list them all here.

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

No branches or pull requests

1 participant