-
Notifications
You must be signed in to change notification settings - Fork 184
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
base: spreadsheet
Are you sure you want to change the base?
feat: added create more functionality #2214
Conversation
ConsoleProject ID: Sites (2)
Note Cursor pagination performs better than offset pagination when loading further pages. |
@@ -26,6 +27,8 @@ | |||
|
|||
let isSubmitting = $state(false); | |||
let columnFormWrapper: HTMLDivElement | null = $state(null); | |||
let createMore = $state(false); | |||
let formResetKey = $state(0); |
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.
can we not use the createRow
variable as a #key
? The formResetKey += 1
isn't that nice.
if (createMore) { | ||
createRow = createRowWritable(); | ||
existingData = null; | ||
formResetKey += 1; | ||
await tick(); | ||
focusFirstInput(); | ||
} |
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.
should we not close the sheet if this option is false
?
onClick: async () => { | ||
await create(); | ||
if (createMore) { | ||
throw new Error('Keep open'); |
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.
why throw an error?
} | ||
} | ||
}} | ||
{footer}> |
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.
we already add a snippet footer above, right?
</Alert.Inline> | ||
{/if} | ||
</Layout.Stack> | ||
{#key formResetKey} |
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.
mentioned the key above
What does this PR do?
This PR adds a "Create more" toggle feature to the table row creation sidebar
Test Plan
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