Skip to content

feat: added create more functionality #2214

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

Open
wants to merge 2 commits into
base: spreadsheet
Choose a base branch
from

Conversation

HarshMN2345
Copy link
Member

@HarshMN2345 HarshMN2345 commented Aug 12, 2025

What does this PR do?

This PR adds a "Create more" toggle feature to the table row creation sidebar

Test Plan

image

Related PRs and Issues

(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)

Have you read the Contributing Guidelines on issues?

yes

Copy link

appwrite bot commented Aug 12, 2025

Console

Project ID: 688b7bf400350cbd60e9

Sites (2)
Site Status Logs Preview QR
 console-qa
688b7cf6003b1842c9dc
Ready Ready View Logs Preview URL QR Code
 console-cloud
688b7c18002b9b871a8f
Ready Ready View Logs Preview URL QR Code

Note

Cursor pagination performs better than offset pagination when loading further pages.

@HarshMN2345 HarshMN2345 marked this pull request as draft August 12, 2025 13:36
@HarshMN2345 HarshMN2345 marked this pull request as ready for review August 14, 2025 06:01
@HarshMN2345 HarshMN2345 requested a review from ItzNotABug August 14, 2025 06:01
@HarshMN2345 HarshMN2345 self-assigned this Aug 14, 2025
@@ -26,6 +27,8 @@

let isSubmitting = $state(false);
let columnFormWrapper: HTMLDivElement | null = $state(null);
let createMore = $state(false);
let formResetKey = $state(0);
Copy link
Member

Choose a reason for hiding this comment

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

can we not use the createRow variable as a #key? The formResetKey += 1 isn't that nice.

Comment on lines +81 to +87
if (createMore) {
createRow = createRowWritable();
existingData = null;
formResetKey += 1;
await tick();
focusFirstInput();
}
Copy link
Member

Choose a reason for hiding this comment

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

should we not close the sheet if this option is false?

onClick: async () => {
await create();
if (createMore) {
throw new Error('Keep open');
Copy link
Member

Choose a reason for hiding this comment

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

why throw an error?

}
}
}}
{footer}>
Copy link
Member

Choose a reason for hiding this comment

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

we already add a snippet footer above, right?

</Alert.Inline>
{/if}
</Layout.Stack>
{#key formResetKey}
Copy link
Member

Choose a reason for hiding this comment

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

mentioned the key above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants