Tulip Logo IconTulip
Inline

Migratiegids

Migreren van het oude inline API contract naar de huidige aanpak.

Deze gids vat de belangrijkste migratiestappen samen.

1) action vervangen

Oud:

<InlineStringInput
  action={({ id, value }) => orpc.tasks.update.call({ id, data: { title: value } })}
/>

Nieuw:

<InlineStringInput
  variables={(value) => ({ id: task.id, data: { title: value } })}
  mutation={orpc.tasks.update.mutationOptions()}
  strategy={{ mode: "blur", validators: { onBlur: z.string().nullable() } }}
/>

2) Provider naam

  • Gebruik InlineProvider
  • Gebruik geen oude provider naam of legacy aliases

3) strategy verplicht

Elke inline input moet een geldige strategy hebben.

4) Form vs table wrappers

  • Form/detail: InlineField + InlineFieldError
  • Table: InlineTableCell + InlineTableCellError

5) Typing checks

Controleer validators per componenttype:

  • String input => string validator
  • Number input => number validator
  • Decimal input => string validator

On this page