mirror of
https://github.com/anyproto/anytype-ts.git
synced 2025-06-08 05:57:02 +09:00
remove full subscription to set
This commit is contained in:
parent
1c02229135
commit
6e68ea5890
2 changed files with 9 additions and 2 deletions
|
@ -373,7 +373,7 @@ const BlockDataview = observer(class BlockDataview extends React.Component<Props
|
|||
|
||||
this.viewId = viewId;
|
||||
|
||||
const { rootId, block } = this.props;
|
||||
const { rootId, block, isInline } = this.props;
|
||||
const subId = this.getSubId();
|
||||
const keys = this.getKeys(viewId);
|
||||
const sources = this.getSources();
|
||||
|
@ -407,6 +407,7 @@ const BlockDataview = observer(class BlockDataview extends React.Component<Props
|
|||
};
|
||||
|
||||
Dataview.getData({
|
||||
isInline,
|
||||
rootId,
|
||||
subId,
|
||||
blockId: block.id,
|
||||
|
|
|
@ -143,12 +143,13 @@ class Dataview {
|
|||
limit: 0,
|
||||
sources: [],
|
||||
clear: false,
|
||||
isInline: false,
|
||||
collectionId: '',
|
||||
filters: [],
|
||||
sorts: [],
|
||||
}, param);
|
||||
|
||||
const { rootId, blockId, newViewId, keys, offset, limit, collectionId } = param;
|
||||
const { rootId, blockId, newViewId, keys, offset, limit, collectionId, clear, isInline } = param;
|
||||
const block = S.Block.getLeaf(rootId, blockId);
|
||||
const view = S.Record.getView(rootId, blockId, newViewId);
|
||||
|
||||
|
@ -169,6 +170,11 @@ class Dataview {
|
|||
meta.viewId = newViewId;
|
||||
};
|
||||
|
||||
if (!isInline && (viewChange || clear)) {
|
||||
S.Record.recordsSet(subId, '', []);
|
||||
};
|
||||
|
||||
|
||||
S.Record.metaSet(subId, '', meta);
|
||||
|
||||
if (block) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue