mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-11 22:18:54 +08:00
refactor(editor): move database selection into the corresponding view (#9752)
This commit is contained in:
@@ -11,8 +11,8 @@ import {
|
||||
renderUniLit,
|
||||
type SingleView,
|
||||
} from '../../../core/index.js';
|
||||
import { TableViewAreaSelection } from '../selection';
|
||||
import type { TableColumn } from '../table-view-manager.js';
|
||||
import { TableAreaSelection } from '../types.js';
|
||||
|
||||
export class MobileTableCell extends SignalWatcher(
|
||||
WithDisposable(ShadowlessElement)
|
||||
@@ -78,7 +78,7 @@ export class MobileTableCell extends SignalWatcher(
|
||||
setSelection({
|
||||
viewId,
|
||||
type: 'table',
|
||||
...TableAreaSelection.create({
|
||||
...TableViewAreaSelection.create({
|
||||
groupKey: this.groupKey,
|
||||
focus: {
|
||||
rowIndex: this.rowIndex,
|
||||
|
||||
@@ -15,8 +15,8 @@ import { GroupTitle } from '../../../core/group-by/group-title.js';
|
||||
import type { GroupData } from '../../../core/group-by/trait.js';
|
||||
import { LEFT_TOOL_BAR_WIDTH } from '../consts.js';
|
||||
import type { DataViewTable } from '../pc/table-view.js';
|
||||
import { TableViewAreaSelection } from '../selection';
|
||||
import type { TableSingleView } from '../table-view-manager.js';
|
||||
import { TableAreaSelection } from '../types.js';
|
||||
|
||||
const styles = css`
|
||||
.data-view-table-group-add-row {
|
||||
@@ -57,7 +57,7 @@ export class MobileTableGroup extends SignalWatcher(
|
||||
const index = this.view.properties$.value.findIndex(
|
||||
v => v.type$.value === 'title'
|
||||
);
|
||||
selectionController.selection = TableAreaSelection.create({
|
||||
selectionController.selection = TableViewAreaSelection.create({
|
||||
groupKey: this.group?.key,
|
||||
focus: {
|
||||
rowIndex: this.rows.length - 1,
|
||||
@@ -75,7 +75,7 @@ export class MobileTableGroup extends SignalWatcher(
|
||||
const index = this.view.properties$.value.findIndex(
|
||||
v => v.type$.value === 'title'
|
||||
);
|
||||
selectionController.selection = TableAreaSelection.create({
|
||||
selectionController.selection = TableViewAreaSelection.create({
|
||||
groupKey: this.group?.key,
|
||||
focus: {
|
||||
rowIndex: 0,
|
||||
|
||||
@@ -16,8 +16,8 @@ import type { DataViewInstance } from '../../../core/index.js';
|
||||
import { renderUniLit } from '../../../core/utils/uni-component/uni-component.js';
|
||||
import { DataViewBase } from '../../../core/view/data-view-base.js';
|
||||
import { LEFT_TOOL_BAR_WIDTH } from '../consts.js';
|
||||
import type { TableViewSelectionWithType } from '../selection';
|
||||
import type { TableSingleView } from '../table-view-manager.js';
|
||||
import type { TableViewSelectionWithType } from '../types.js';
|
||||
|
||||
export class MobileDataViewTable extends DataViewBase<
|
||||
TableSingleView,
|
||||
|
||||
Reference in New Issue
Block a user