mirror of
https://github.com/anyproto/anytype-ts.git
synced 2025-06-08 05:57:02 +09:00
JS-7050: fixes
This commit is contained in:
parent
6b333633ec
commit
5931ed13c0
6 changed files with 30 additions and 3 deletions
|
@ -705,7 +705,7 @@ const BlockDataview = observer(class BlockDataview extends React.Component<Props
|
|||
U.Object.openConfig(object);
|
||||
} else {
|
||||
if (U.Object.isNoteLayout(object.layout)) {
|
||||
this.onCellClick(e, 'name', object.id);
|
||||
this.onCellClick(e, 'name', object.id, object);
|
||||
} else {
|
||||
window.setTimeout(() => {
|
||||
const id = Relation.cellId(this.getIdPrefix(), 'name', object.id);
|
||||
|
@ -926,7 +926,7 @@ const BlockDataview = observer(class BlockDataview extends React.Component<Props
|
|||
|
||||
if (keyboard.withCommand(e)) {
|
||||
if (!ids.length) {
|
||||
U.Object.openEvent(e, record);
|
||||
U.Object.openPopup(record);
|
||||
};
|
||||
} else {
|
||||
U.Object.openConfig(record);
|
||||
|
|
|
@ -84,6 +84,13 @@ const ViewBoard = observer(class ViewBoard extends React.Component<I.ViewCompone
|
|||
componentDidUpdate () {
|
||||
this.resize();
|
||||
U.Common.triggerResizeEditor(this.props.isPopup);
|
||||
|
||||
const selection = S.Common.getRef('selectionProvider');
|
||||
const ids = selection?.get(I.SelectType.Record) || [];
|
||||
|
||||
if (ids.length) {
|
||||
selection?.renderSelection();
|
||||
};
|
||||
};
|
||||
|
||||
componentWillUnmount () {
|
||||
|
|
|
@ -169,6 +169,13 @@ const ViewGallery = observer(class ViewGallery extends React.Component<I.ViewCom
|
|||
|
||||
componentDidUpdate (): void {
|
||||
this.reset();
|
||||
|
||||
const selection = S.Common.getRef('selectionProvider');
|
||||
const ids = selection?.get(I.SelectType.Record) || [];
|
||||
|
||||
if (ids.length) {
|
||||
selection?.renderSelection();
|
||||
};
|
||||
};
|
||||
|
||||
componentWillUnmount () {
|
||||
|
|
|
@ -160,6 +160,13 @@ const ViewGrid = observer(class ViewGrid extends React.Component<I.ViewComponent
|
|||
this.onScrollHorizontal();
|
||||
this.onScrollVertical();
|
||||
|
||||
const selection = S.Common.getRef('selectionProvider');
|
||||
const ids = selection?.get(I.SelectType.Record) || [];
|
||||
|
||||
if (ids.length) {
|
||||
selection?.renderSelection();
|
||||
};
|
||||
|
||||
U.Common.triggerResizeEditor(this.props.isPopup);
|
||||
};
|
||||
|
||||
|
|
|
@ -124,6 +124,13 @@ const ViewList = observer(class ViewList extends React.Component<I.ViewComponent
|
|||
|
||||
componentDidUpdate () {
|
||||
U.Common.triggerResizeEditor(this.props.isPopup);
|
||||
|
||||
const selection = S.Common.getRef('selectionProvider');
|
||||
const ids = selection?.get(I.SelectType.Record) || [];
|
||||
|
||||
if (ids.length) {
|
||||
selection?.renderSelection();
|
||||
};
|
||||
};
|
||||
|
||||
loadMoreRows ({ startIndex, stopIndex }) {
|
||||
|
|
|
@ -565,7 +565,6 @@ const SelectionProvider = observer(forwardRef<SelectionRefProps, Props>((props,
|
|||
};
|
||||
|
||||
const renderSelection = () => {
|
||||
const { config } = S.Common;
|
||||
const container = getPageContainer();
|
||||
|
||||
if (frame.current) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue