Guides
v0.0.7
Each guide covers one task with Mishka Gervaz: mount a table and a form in a LiveView, build a table and a form, filter a table, add row and bulk actions, keep the table state in the URL and update it live, split a form into steps, add file uploads, react to events with hooks, and translate labels and messages.
Pick the guide for the job in front of you. The pages below show each one with a short summary.
- Mount a table and a form in a LiveView Mount the Gervaz table and form LiveComponents, decode the URL, answer their messages, forward realtime updates and close the form's modal.
- Build an admin table Build a Gervaz admin table: name it, choose its actions and preloads, declare and sort columns, and draw cells with types or render functions.
- Filter a table Add search, select, relation, date range and dependent filters to a Gervaz table, then group them into collapsible panels.
- Add row and bulk actions Add edit, archive, restore and delete buttons to each row of a Gervaz table, lay them out inline or in a dropdown, and add bulk actions.
- Share table state and update it live Set the pagination of a Gervaz table, keep its filters and page in the URL, update rows over PubSub, and reload it on a timer.
- Build an admin form Build a Gervaz admin form: declare fields, pick related records, edit nested maps, group the fields and set the submit buttons.
- Split a form into steps Turn a Gervaz form into a wizard or tabs, define its steps, choose how the reader moves, and gate a step with your own rule.
- Add file uploads to a form Add file uploads to a Gervaz form: declare the dropzone, receive the files in an Ash action and show existing files in edit mode.
- React to table and form events with hooks Use Gervaz hooks to scope a table query, observe or replace row and bulk actions, control flash messages, and react to form events.
- Translate labels and messages Point Gervaz at your Gettext backend, mark strings that only the DSL holds for extraction, and keep the locale in async work.