Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(database): support row-level selection #2561

Merged
merged 23 commits into from
May 16, 2023

Conversation

zqran
Copy link
Sponsor Member

@zqran zqran commented May 12, 2023

close: #2468
alo close: #2467

2023-05-15.10.09.45.mov

@codesandbox
Copy link

codesandbox bot commented May 12, 2023

CodeSandbox logoCodeSandbox logo  Open in CodeSandbox Web Editor | VS Code | VS Code Insiders | Preview

@vercel
Copy link

vercel bot commented May 12, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
blocksuite ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 16, 2023 4:37am
blocksuite-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 16, 2023 4:37am

@zqran zqran changed the title feat(database): optimize database selection feat(database): support row-level selection May 15, 2023
@zqran zqran marked this pull request as ready for review May 15, 2023 02:08
@@ -447,6 +455,18 @@ export class DefaultPageBlockComponent
slots.embedEditingStateUpdated.on(embedEditingState => {
this._embedEditingState = embedEditingState;
});
slots.databaseTableUpdated.on(state => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you move this slot into database model?

@@ -539,6 +539,24 @@ export function createDragHandle(pageBlock: DefaultPageBlockComponent) {
pageBlock.selection.state.type = dragging ? 'block:drag' : 'block';
},
setSelectedBlock(modelState: EditingState | null) {
if (modelState) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of handle database selection here, maybe we can move this into database service.

@tzhangchi
Copy link
Contributor

I really like this idea

@Saul-Mirone Saul-Mirone merged commit f62c474 into toeverything:master May 16, 2023
12 checks passed
@zqran zqran deleted the 0512-db-selection branch May 16, 2023 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Archived in project
5 participants