CRUD / foldkit-crud

foldkit-crud

The screens that list, show, edit and delete records, built from parts your application already has: a foldkit-remote domain, the foldkit-entity Entities it holds, and, for an editor, a foldkit-form form. It draws nothing and holds almost no state. A list is one query and what to show of each row:

ts
const Authors = Crud.list('Authors', {
  query: AuthorsQuery,
  selection: Entity.select(Blog.Author, { id: true, name: true }),
})
const AuthorList = Authors.at({ data: Data, input: model => Option.some({ search: model.search }) })

AuthorList.page(model) // RemoteData of the page: its typed rows, hasNext, hasPrevious

It is for any such screen, a user editing their own post as much as a back office. examples/entity draws a list, an editor and a remover, and runs in a browser.