-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Remote functions doc & types tweak #14653
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
Conversation
…sues() ?? []" in userland)
|
|
|
||
| <div class="preview"> | ||
| <h2>{createPost.fields.title.value()}</h2> | ||
| <div>{@html render(createPost.fields.content.value())}</div> |
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.
this is supposed to be turning markdown to HTML — without it, it would just display the exact thing that's already in the <textarea>
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.
renderMd is ugly!
I just don't know how to say: It's not from svelte
| /** Set the values that will be submitted */ | ||
| set(input: T): T; | ||
| /** Validation issues, if any */ | ||
| issues(): RemoteFormIssue[] | undefined; |
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.
i don't think we want this! at the moment !field.issues() serves as a proxy for 'is valid', which would no longer be true if it always returned an array
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.
I see.
Maybe adding in docs ?? [] then?
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.
see #14628 (comment) — you can use it without the ?? [], it causes squigglies at the moment but we can fix that
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.
Perfect
…void "issues() ?? []" in userland)" This reverts commit c356bed.
With the type update, userland can do: (like in the doc)
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm testand lint the project withpnpm lintandpnpm checkChangesets
pnpm changesetand following the prompts. Changesets that add features should beminorand those that fix bugs should bepatch. Please prefix changeset messages withfeat:,fix:, orchore:.Edits