v-for prop value not getting updated with bootstrap modal

前端 未结 1 1117
醉梦人生
醉梦人生 2021-01-20 20:28

I have the following code snippet

1条回答
  •  萌比男神i
    2021-01-20 20:35

    You may need to add key in v-for

    For the improvement of performance, v-for uses an “in-place patch” strategy and list rendering will not change on child component state or temporary DOM state changes. To track these changes you need to add key attribute with v-for.

    I hope spaces are just typo in , remove spaces from :currentevent = "evt".


    Edited

    You are showing same modal everytime, props are being passed correctly, but you are loading the same modal each time.

    You should have dynamic id for each modal like following:

    
    

    and when you are showing this, you should use this dynamic id as following:

    $("#" + event.id).modal()
    

    0 讨论(0)
提交回复
热议问题