spatie / statamic-responsive-images

Responsive images for Statamic 3
MIT License
104 stars 29 forks source link

Vue "Avoid mutating a prop directly" warning for ResponsiveFieldtype component #155

Closed ncla closed 2 years ago

ncla commented 2 years ago

Not a show stopper but probably good idea to address it eventually. Warning triggers after you change the value of the responsive fieldtype fields in control panel.

vue.common.dev.js:4992 [Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value. Prop being mutated: "value"

found in

---> <ResponsiveFieldtype> at resources/js/ResponsiveFieldtype.vue
       <PublishFieldMeta> at resources/js/components/publish/FieldMeta.vue
         <PublishField> at resources/js/components/publish/Field.vue
           <ElementContainer> at resources/js/components/ElementContainer.vue
             <PublishFieldsContainer> at resources/js/components/publish/FieldsContainer.vue
               <PublishFields> at resources/js/components/publish/Fields.vue
                 <ElementContainer> at resources/js/components/ElementContainer.vue
                   <PublishSections> at resources/js/components/publish/Sections.vue
                     <Provider> at resources/js/components/live-preview/Provider.vue
                       <LivePreview> at resources/js/components/live-preview/LivePreview.vue
                         <PublishContainer> at resources/js/components/publish/Container.vue
                           <EntryPublishForm> at resources/js/components/entries/PublishForm.vue
                             <Root>