1
0
Fork 0
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:
Andrew Simachev 2025-05-12 09:59:42 +02:00
parent 6b333633ec
commit 5931ed13c0
No known key found for this signature in database
GPG key ID: 1DFE44B21443F0EF
6 changed files with 30 additions and 3 deletions

View file

@ -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);

View file

@ -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 () {

View file

@ -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 () {

View file

@ -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);
};

View file

@ -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 }) {

View file

@ -565,7 +565,6 @@ const SelectionProvider = observer(forwardRef<SelectionRefProps, Props>((props,
};
const renderSelection = () => {
const { config } = S.Common;
const container = getPageContainer();
if (frame.current) {