Skip to content

Commit

Permalink
add comment for validation changeset action; remove console
Browse files Browse the repository at this point in the history
  • Loading branch information
floodfx committed Feb 8, 2022
1 parent d65f81e commit ef386ac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/examples/volunteers/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@ export class VolunteerComponent extends BaseLiveViewComponent<VolunteerContext,
handleEvent(event: VolunteerEvents, params: StringPropertyValues<Pick<Volunteer, "name" | "phone">>, socket: LiveViewSocket<VolunteerContext>): VolunteerContext {
if (event === "validate") {
const validateChangeset = changeset({}, params);
// set an action or else the changeset will be ignored
// and form errors will not be shown
validateChangeset.action = "validate";
console.log("validate", params, validateChangeset);
return {
volunteers: [],
changeset: validateChangeset
Expand Down

0 comments on commit ef386ac

Please sign in to comment.