Skip to content

Commit fce12e7

Browse files
committed
chore: add migration snippet to changeset
1 parent 0fbf4eb commit fce12e7

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

.changeset/replace-create-field-with-detect-fields.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,14 @@
22
"@simplepdf/react-embed-pdf": major
33
---
44

5-
Replaces `createField` with `detectFields` for automatic form field detection. This is a breaking change: the `createField` action and `CreateFieldOptions` type have been removed. If you are not using `createField`, you can safely update to this new major version.
5+
Replaces `createField` with `detectFields` for automatic form field detection. This is a breaking change: the `createField` action and `CreateFieldOptions` type have been removed.
6+
7+
If you are not using `actions.createField(...)` or `sendEvent("CREATE_FIELD", ...)`, you can safely update to this new major version.
8+
9+
```ts
10+
// Before (removed)
11+
await actions.createField({ type: "TEXT", page: 1, x: 100, y: 700, width: 200, height: 30 });
12+
13+
// After
14+
await actions.detectFields();
15+
```

0 commit comments

Comments
 (0)