October: Repeater item and parents dependsOn issue

Created on 25 Aug 2020  路  4Comments  路  Source: octobercms/october

  • OctoberCMS Build: 468
  • PHP Version: 7.2

Description:

While depending on repeater field from a field within the repeater fields, the js crashes when deleting a repeater item.

step_fields:
    label: 'Vragen'
            type: repeater
            span: full
            form:
                fields:
                    question_trigger:
                        label: 'Toon vraag als'
                        type: dropdown
                        placeholder: 'Selecteer vraag'
                        span: storm
                        cssClass: col-sm-6
                        dependsOn: step_fields
                        trigger:
                            action: show
                            field: question_use_trigger
                            condition: checked

Produces this error when trying to delete a repeater:
CleanShot 2020-08-25 at 15 28 42@2x

Fix

Flipping these two lines fixes the issue:

I was wondering why the change event is called before the item is deleted. Is there something expecting this event before deleting the item?

If not, then I would like to suggest flipping these lines. If needed, I can provide a PR.

Steps To Reproduce:

See above

Archived Response Needed Unconfirmed Bug

All 4 comments

@SebastiaanKloos there is a problem doing it the other way around: https://github.com/octobercms/october/pull/4736#discussion_r400566131

@LukeTowers Totally missed your comment. I'll check it tomorrow. Thank you for your reply!

@SebastiaanKloos there is a problem doing it the other way around: https://github.com/octobercms/october/pull/4736#discussion_r400566131

Ahh gotcha. I'll debug it a bit more tomorrow

This issue will be closed and archived in 3 days, as there has been no activity in the last 60 days.
If this issue is still relevant or you would like to see it actioned, please respond and we will re-open this issue.
If this issue is critical to your business, consider joining the Premium Support Program where a Service Level Agreement is offered.

Was this page helpful?
0 / 5 - 0 ratings