-
-
Notifications
You must be signed in to change notification settings - Fork 347
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
fix(database): table view progress filtering #5454
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great to see your contribution, could you sign our CLA for the following review process? Thanks!
Considering the amount of data, doing this to add a column to a large table may require initializing a very large number of cells, and it's best to deal with this situation in the filter logic like this greatThan: {
type: tFunction({
args: [tNumber.create(), tNumber.create()],
rt: tBoolean.create(),
}),
label: '>',
impl: (value, target) => {
value = value ?? 0;
if (typeof value !== 'number' || typeof target !== 'number') {
return true;
}
return value > target;
},
}, |
Thank you for reviewing my code. I will fix it quickly! |
The reason why filtering for the progress value did not work properly seems to be because the initialization did not proceed properly when a new column (type=progress) was added to the table view. Therefore, the code was modified to proceed with initialization in the function that sets the property type in the file 'database-block-datasource.ts'.
The video below shows filtering operating normally after modifying the code.
blocksuite.pr.mov
close #5451