mirror of
https://github.com/anyproto/anytype-ts.git
synced 2025-06-10 10:00:48 +09:00
JS-4107: read-only fixes
This commit is contained in:
parent
343b839b1e
commit
344364fb65
2 changed files with 22 additions and 6 deletions
|
@ -368,9 +368,13 @@ const Controls = observer(class Controls extends React.Component<Props> {
|
|||
onViewContext (e: any, element: string, view: any) {
|
||||
e.stopPropagation();
|
||||
|
||||
const { rootId, block } = this.props;
|
||||
const { rootId, block, readonly } = this.props;
|
||||
if (readonly) {
|
||||
return;
|
||||
};
|
||||
|
||||
const contextParam = {
|
||||
this.onViewSet(view);
|
||||
UtilMenu.viewContextMenu({
|
||||
rootId,
|
||||
blockId: block.id,
|
||||
view,
|
||||
|
@ -382,10 +386,7 @@ const Controls = observer(class Controls extends React.Component<Props> {
|
|||
horizontal: I.MenuDirection.Center,
|
||||
noFlipY: true,
|
||||
}
|
||||
};
|
||||
|
||||
this.onViewSet(view);
|
||||
UtilMenu.viewContextMenu(contextParam);
|
||||
});
|
||||
};
|
||||
|
||||
onSortStart () {
|
||||
|
|
|
@ -591,6 +591,11 @@ const MenuDataviewFilterValues = observer(class MenuDataviewFilterValues extends
|
|||
};
|
||||
|
||||
onFocusDate (e: any) {
|
||||
const isReadonly = this.isReadonly();
|
||||
if (isReadonly) {
|
||||
return;
|
||||
};
|
||||
|
||||
const { param } = this.props;
|
||||
const { data } = param;
|
||||
const { getView, itemId } = data;
|
||||
|
@ -630,6 +635,11 @@ const MenuDataviewFilterValues = observer(class MenuDataviewFilterValues extends
|
|||
};
|
||||
|
||||
onTag () {
|
||||
const isReadonly = this.isReadonly();
|
||||
if (isReadonly) {
|
||||
return;
|
||||
};
|
||||
|
||||
const { param, getId, getSize } = this.props;
|
||||
const { data } = param;
|
||||
const { rootId, blockId, getView, itemId } = data;
|
||||
|
@ -657,6 +667,11 @@ const MenuDataviewFilterValues = observer(class MenuDataviewFilterValues extends
|
|||
};
|
||||
|
||||
onObject (e: any, item: any) {
|
||||
const isReadonly = this.isReadonly();
|
||||
if (isReadonly) {
|
||||
return;
|
||||
};
|
||||
|
||||
const { param, getId, getSize } = this.props;
|
||||
const { data } = param;
|
||||
const { rootId, blockId } = data;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue