Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(portable-text-editor): allow user event handlers on Editable component #5058

Merged
merged 2 commits into from
Oct 24, 2023

Conversation

skogsmaskin
Copy link
Member

@skogsmaskin skogsmaskin commented Oct 24, 2023

Description

This will allow the consumer to specify their own onKeyDown, onFocus, and onBlur event handlers on the Editable component of the PTE in addition to the internal ones.

Also fixed a prop typing (onBeforeInput) that was problematic to use.

What to review

That the code looks alright.

Notes for release

N/A

…r for Editable

These props should be able to be overridden and potentially stopped before performing our internal behaviour.
@vercel
Copy link

vercel bot commented Oct 24, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
performance-studio ✅ Ready (Inspect) Visit Preview Oct 24, 2023 11:52am
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 24, 2023 11:52am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Visit Preview Oct 24, 2023 11:52am

@skogsmaskin skogsmaskin marked this pull request as ready for review October 24, 2023 11:47
@github-actions
Copy link
Contributor

No changes to documentation

@github-actions
Copy link
Contributor

github-actions bot commented Oct 24, 2023

Component Testing Report Updated Oct 24, 2023 11:57 AM (UTC)

File Status Duration Passed Skipped Failed
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 9s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 12s 3 0 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 11s 6 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 33s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 16s 9 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 54s 18 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 13s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 7s 3 0 0

Copy link
Member

@bjoerge bjoerge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@skogsmaskin skogsmaskin added this pull request to the merge queue Oct 24, 2023
Merged via the queue into next with commit 441f637 Oct 24, 2023
21 checks passed
@skogsmaskin skogsmaskin deleted the fix/pte-misc branch October 24, 2023 14:24
skogsmaskin added a commit that referenced this pull request Nov 2, 2023
…onent (#5058)

* fix(portable-text-editor): allow overriding onKeyDown, onFocus, onBlur for Editable

These props should be able to be overridden and potentially stopped before performing our internal behaviour.

* fix(portable-text-editor): specify InputEvent event type for TS-type
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants