0๐
A working JSFiddle might be helpful here, but Iโm guessing that you could fix it by using:
demo.$set("items", demo.items.filter(function (item) {
return item.childMsg.match(/Hello/)
})
0๐
You can use this function to remove observable proto from objects and arrays.
const clone = (value) => {
if (!value) return value;
const isObject = (typeof value === 'object');
const isArray = Array.isArray(value);
if (!isObject && !isArray) return value;
// Removing reference of Array of values
if (isArray) return [...value.map(val => clone(val))];
if (isObject) return { ...value };
return value;
};
- [Vuejs]-Keeping client side in sync with server side โ state management and http requests
- [Vuejs]-[Vue warn]: Prop "zoom" expects a two-way binding type. (found in component: <map>)
Source:stackexchange.com