deep-foundation / deep-foundation/deepcase-app
deep.update doesnt update value in editor
- Dominant language
- TypeScript
- Stars
- 10
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the bug
If we update the value of the link with deep.update we have the updated value in the link, but if we open it in the editor we have the old value before the update:





### To Reproduce
Try to update the value for a random link using deep.update, and after the update, open this link in the editor, as you can see the value is old there (this link must be open in the editor)
### Code snippet
Create a link with the value [] or something else and try to do in the console:
```js
const anyTypeLinkId = await deep.id('@deep-foundation/core', "Any");
const typeTypeLinkId = await deep.id('@deep-foundation/core', "Type");
const containTypeLinkId = await deep.id('@deep-foundation/core', "Contain");
const typeStringLinkId = await deep.id('@deep-foundation/core', "Object");
const typeValueLinkId = await deep.id('@deep-foundation/core', "Value");
const { data: [{ id: testTypeLinkId, }] } = await deep.insert({
type_id: typeTypeLinkId,
in: {
data: {
type_id: containTypeLinkId,
from_id: 380,
string: { data: { value: "Test" } }
},
},
out: {
data: {
type_id: typeValueLinkId,
to_id: typeStringLinkId,
in: {
data: {
from_id: 380,
type_id: containTypeLinkId,
string: { data: { value: 'Test' } },
}
}
}
}
});
const { data: [{ id: testLinkId, }] } = await deep.insert({
type_id:testTypeLinkId,
object:{ data: { value: [] }},
in:{
type_id:containTypeLinkId,
from_id:380,
}
})
```
after that open the editor of this link and close, now you can update its value:
```js
await deep.update(
{
link_id: testLinkId
},
{
value: [1,2,3]
},
{
table: 'objects'
}
);
```
now you can open the editor and see the result `[]`, to update it you need to close this link in the editor and reopen it and see `[1,2,3]`
### Expected behavior
I expect that our editor to have the same value that I replaced the current value for this link with, but right now we can only see it after closing this link in the editor and opening it again
### Package Version
_No response_
### Node.js Version
_No response_
### OS
_No response_
### Additional Library Versions
_No response_
### Additional context/Screenshots
_No response_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.