Remove row deletes only one row.
Case:

1. Add few rows
2. Hit Remove Row
3. Row deleted
4. Hit Remove another row
Result: Row is deleted, but row from step#2 is restored

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

twin84 created an issue. See original summary.

chetan-singhal’s picture

can you share screenshot?

chetan-singhal’s picture

Status: Active » Closed (cannot reproduce)

Unable to reproduce
or you are using old branch check with new branch and let me know.

dureaghin’s picture

Same issue with the latest version. This is happens when you using "Row wise delete button" option.

chetan-singhal’s picture

will fix in next release

dureaghin’s picture

Hi,
When do you expect to release new version?

Thanks,

chetan-singhal’s picture

max next week. If you need urgent let me know.

dureaghin’s picture

Hi Chetan,
We need this feature urgently. Are you planning soon to fix this feature?

Thanks,

chetan-singhal’s picture

Status: Closed (cannot reproduce) » Needs work
richgerdes’s picture

Version: 7.x-2.x-dev » 7.x-4.x-dev
Priority: Normal » Major
Status: Needs work » Needs review
FileSize
1.71 KB

The removal process did not take into account removing multiple rows, and stored the removed row, and hide that row during rendering. When a second row was removed, the id was replaced, and the original row appeared again.

Here is a patch that should resolve the issue. It removes the values from the array during the call back before rebuilding the form, instead of tracking the data and having the form building skip the row. This also simplifies the logic and by not needed to track the row id.

wiktorb’s picture

Your patch is great but you have to replace all ["records"] with [$form_key] when your component Form Key is different than records.

richgerdes’s picture

FileSize
1.98 KB

Here is the fixed patch with [$form_key]instead of ["records"].

Maroli’s picture

Hi guys, I am not that good at patching files, so my silly question is: when does this patched version become availlable?

chetan-singhal’s picture

Status: Needs review » Fixed
chetan-singhal’s picture

Status: Fixed » Closed (fixed)