# material-table-core-formik

> A @material-table/core wrapper to display a dialog for add, edit and delete. It also allows Formik/YUP validation.

Latest version **0.1.0** (published 2021-12-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install material-table-core-formik
pnpm add material-table-core-formik
yarn add material-table-core-formik
bun add material-table-core-formik
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2021-12-03 |
| First published | 2021-12-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 4 |
| Unpacked size | 259.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Moritz Schroeder |
| Maintainers | iceshack |
| Keywords | @material-table, @material-ui, react, formik, YUP |

## Links

- npm: https://www.npmjs.com/package/material-table-core-formik
- Repository: https://github.com/IceShack/material-table-core-formik
- Issues: https://github.com/IceShack/material-table-core-formik/issues
- npm.io page: https://npm.io/package/material-table-core-formik

## Dependencies (4)

- [formik](https://npm.io/package/formik.md) ^2.1.5
- [@date-io/core](https://npm.io/package/@date-io/core.md) ^1.3.13
- [@material-ui/core](https://npm.io/package/@material-ui/core.md) ^4.11.2
- [@material-table/core](https://npm.io/package/@material-table/core.md) ^4.3.11

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.1.0 (latest) — 2021-12-03

## README

# Material Table Formik with Dialogs (cloned from [material-table-formik](https://github.com/Domino987/material-table-formik))

This package is a simple wrapper for [@material-table/core](https://github.com/material-table-core/core).

It displays dialogs instead of the inline edit for the Add, Update and Delete actions.

Additionally, it allows the validation with [Formik](https://github.com/jaredpalmer/formik) and [YUP](https://github.com/jquense/yup) for these actions as well.

## Now with Grid Support

Add [Material-Ui Grid Props](https://material-ui.com/api/grid/) with gridProps to the columns to order the edit fields within the dialog.

```
gridProps: { xs: 12, md: 6 }
```

## Screenshot

![Example Display](screenshot.png)

## Requirement

To use material-table-core-formik, you must use react@16.8.0 or greater which includes hooks.

## Installation

This package is distributed via [npm](https://www.npmjs.com/package/material-table-core-formik).

```
$ yarn add material-table-core-formik
# or
$ npm install --save material-table-core-formik
```

## Getting Started

Simply exchange the material table import:

```
import MaterialTable from "@material-table/core";
```

with

```
import MaterialTable from "material-table-core-formik";
```

This will display the edit/update/delete action in a separate dialog instead inline.

## Props

In addition to the material table props, it also accepts these optional props:

| Name              | Type                                                                  | Description                                                                                  |
| ----------------- | --------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| validate          | (value: RowData) => void \| object \| Promise<FormikErrors<RowData>>; | The Formik validation to be applied to each field                                            |
| validationSchema  | any \| (() => any)                                                    | The YUP validation schema                                                                    |
| localization      | deleteHeader?: string <br> deleteAction?: string                      | The added localizations for the dialog                                                       |
| columns.gridProps | [Material-ui Grid Props](https://material-ui.com/api/grid/)           | The columns are extended to allow grid props for positioning of the fields within the dialog |

## Author

- [Dominik Engel](https://github.com/Domino987)
- [Moritz Schroeder](https://github.com/IceShack)

This project follows the all-contributors specification. Contributions of any kind welcome!

Built with [TSDX](https://github.com/jaredpalmer/tsdx)

---
_Source: https://npm.io/package/material-table-core-formik · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
