Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
#12 | webform_matrix_component-2771747-12.patch | 1.98 KB | richgerdes |
|
Comments
Comment #2
chetan-singhal CreditAttribution: chetan-singhal commentedcan you share screenshot?
Comment #3
chetan-singhal CreditAttribution: chetan-singhal commentedUnable to reproduce
or you are using old branch check with new branch and let me know.
Comment #4
dureaghin CreditAttribution: dureaghin commentedSame issue with the latest version. This is happens when you using "Row wise delete button" option.
Comment #5
chetan-singhal CreditAttribution: chetan-singhal commentedwill fix in next release
Comment #6
dureaghin CreditAttribution: dureaghin commentedHi,
When do you expect to release new version?
Thanks,
Comment #7
chetan-singhal CreditAttribution: chetan-singhal commentedmax next week. If you need urgent let me know.
Comment #8
dureaghin CreditAttribution: dureaghin commentedHi Chetan,
We need this feature urgently. Are you planning soon to fix this feature?
Thanks,
Comment #9
chetan-singhal CreditAttribution: chetan-singhal commentedComment #10
richgerdesThe 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.
Comment #11
wiktorb CreditAttribution: wiktorb at RatioWeb commentedYour patch is great but you have to replace all ["records"] with [$form_key] when your component Form Key is different than records.
Comment #12
richgerdesHere is the fixed patch with
[$form_key]
instead of["records"]
.Comment #13
Maroli CreditAttribution: Maroli commentedHi guys, I am not that good at patching files, so my silly question is: when does this patched version become availlable?
Comment #15
chetan-singhal CreditAttribution: chetan-singhal commentedComment #16
chetan-singhal CreditAttribution: chetan-singhal commented