1.0.16 • Published 8 months ago

@felte/extender-persist v1.0.16

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

@felte/extender-persist

Tests Bundle size NPM Version codecov

A package to persist your form's state in localStorage.

Installation

npm install --save @felte/extender-persist

# Or, if you use yarn

yarn add @felte/extender-persist

Usage

Extend Felte with the extender export, the extenders accepts an object with options. A unique ID is required to use it as the ID for the localStorage.

import { extender } from '@felte/validator-yup';

const { form } = createForm({
  // ...
  extend: extender({ id: 'uniqueId' }), // or `extend: [extender({ id: 'uniqueId' })],`
  // ...
});

Ignoring fields

You might not want to save certain fields such as passwords to local storage, for this you may add an extra property to the configuration of the extender with an array of paths to the data you want to ignore:

{
  extend: extender({ id: 'uniqueId', ignore: ['account.password'] }),
}

Or you may add the attribute data-felte-extender-persist-ignore to the input you don't want to persist.

1.0.16

8 months ago

1.0.15

11 months ago

1.0.14

11 months ago

1.0.13

11 months ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.0-next.19

2 years ago

1.0.1

2 years ago

1.0.0-next.18

2 years ago

1.0.0

2 years ago

1.0.0-next.17

2 years ago

1.0.0-next.16

2 years ago

1.0.0-next.11

2 years ago

1.0.0-next.10

2 years ago

1.0.0-next.15

2 years ago

1.0.0-next.14

2 years ago

1.0.0-next.13

2 years ago

1.0.0-next.12

2 years ago

1.0.0-next.0

2 years ago

1.0.0-next.1

2 years ago

1.0.0-next.2

2 years ago

1.0.0-next.22

2 years ago

1.0.0-next.21

2 years ago

1.0.0-next.20

2 years ago

1.0.0-next.3

2 years ago

1.0.0-next.4

2 years ago

0.1.17

2 years ago

1.0.0-next.5

2 years ago

1.0.0-next.6

2 years ago

1.0.0-next.7

2 years ago

1.0.0-next.8

2 years ago

1.0.0-next.9

2 years ago

0.1.15

2 years ago

0.1.16

2 years ago

0.1.14

3 years ago

0.1.13

3 years ago

0.1.12

3 years ago

0.1.11

3 years ago

0.1.10

3 years ago

0.1.9

3 years ago

0.1.8

3 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago