Data View 4.8.x repeat region index issue

I’m not sure if this is a bug or if an updated syntax is required since the 4.8.x releases but I can no longer get data views filtering properly when referenced in a repeat region with a serverconnect data set.

Using $index in this scenario no longer works.

filter="type_id == svrconnect_dashboard.data.qry_schedule_event_overview[$index].type_id" use to work before the update. While I can get results back if I use [{{$index}}] it does not actually filter anything. Otherwise using $index produces zero results.

Anyone else experiencing this or is there an updated syntax?

Same issue

1 Like

Any thoughts on timing to get this resolved or a way I can get a 4.7.x version as I’m stuck at this point and I have an upcoming deliverable?

Could you give a small sample of your code, want to know how the components are nested. Since you use the $index in the filter I assume you have the dataview within the repeater?

Hey Patrick -

Yes, that’s correct. I’m using a data view within the repeater of various components. On several pages, I use the data view in a repeater for cards and others I use it for swipers.

I’ll post some stripped down sample code in a few hours.

Thanks!

I have the same with data views and mixed up indexes:

So this bug report is related to this right?

Is it only the $index that is wrong or is it messing up the whole order of the items?

The order is right, just the $index is messed up (Using data view)

Please test this update: dmxAppConnect.zip (26.1 KB)

1 Like

Works!

Thanks, Patrick. Unfortunately this update still does not work for my scenario.

Code snippet below:

  <div class="card-deck pt-2 pb-2" is="dmx-repeat" id="repeat_event" dmx-bind:repeat="4">
        <dmx-data-view id="data_view_bracket_details" dmx-bind:data="svrconnect_score_bracket_overview.data.qry_next_match" filter="event_type_id==svrconnect_score_dashboard.data.qry_ring_schedule_event_overview[$index].event_type_id">
        </dmx-data-view>

        <dmx-data-view id="data_view_bracket_one" dmx-bind:data="svrconnect_round_status.data.qry_round_status" filter="event_type_id == svrconnect_score_dashboard.data.qry_ring_schedule_event_overview[$index].event_type_id"></dmx-data-view>
        
        <div class="card" dmx-class:card_body_inactive="!svrconnect_score_dashboard.data.qry_ring_schedule_event_overview[$index].event_type_id">
            <div class="card-header text-light bg-primary" dmx-hide="!svrconnect_score_dashboard.data.qry_ring_schedule_event_overview[$index].event_type_name" id="lbl_event_name" >
                {{svrconnect_score_dashboard.data.qry_ring_schedule_event_overview[$index].event_type_name}}
            </div>

            <div class="card-body" dmx-hide:="!svrconnect_score_dashboard.data.qry_ring_schedule_event_overview[$index].event_type_name">
                <div class="row">
                    <div class="col">
                   
                        <h6 id="lbl_up_next" class="font-weight-light text-black-50 text-uppercase">Up Next</h6>
                        <h6 id="lbl_competitor_group" class="text-secondary text-center small text-monospace font-weight-lighter">
                            {{(svrconnect_score_dashboard.data.qry_ring_schedule_event_overview[$index].requires_bracket_flag ) ? (data_view_bracket_details.data[0].competitor_name) ? (data_view_bracket_details.data[0].competitor_name + ' vs. ' + data_view_bracket_details.data[1].competitor_name) : ' ' : svrconnect_score_dashboard.data.qry_ring_schedule_event_overview[$index].up_next_competitor_name}}
                        </h6>

                    </div>
                </div>
    

                <p class="card-text text-black-50 text-center mt-2 mb-0"><b>{{svrconnect_score_dashboard.data.qry_ring_schedule_event_overview[$index].num_competitors}}</b> Total Competitors</p>
               
            </div>
        </div>
    </div>

The filters of the data views are still being ignored and worked prior to the 4.8.x update.

Note : This page doesn’t display the full contents of the snippet but in edit view it has the full uploaded snippet.

Please test this update: dmxDataTraversal.zip (1.7 KB)

Thanks again Patrick. Unless I’m not placing the file in the appropriate folder, it didn’t seem to change anything.

I placed it in public/dmxAppConnect/dmxDataTraversal and restarted.

The path is correct, here a new update.

dmxDataTraversal.zip (1.7 KB)

EDIT : Confirmed it works for the swiper too.

Awesome! Looks like it fixed it for cards but perhaps not for swiper slides? I’ll double check on my end to make sure I haven’t messed anything up while troubleshooting.

Thank you so much for your help!

Fixed in Wappler 4.8.2