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(events): type spread event props #2608

Merged
merged 1 commit into from Nov 2, 2022

Conversation

CodyJasonBennett
Copy link
Member

Events spread their non-atomic properties to handlers, but aren't typed accordingly. A work-around would be to directly access nativeEvent.

<mesh
  onClick={(event: ThreeEvent<MouseEvent>) => {
    console.log(event.nativeEvent.shiftKey)
    console.log(event.shiftKey) // TS2339: Property 'shiftKey' does not exist on type 'ThreeEvent'.
  }}
/>

@codesandbox-ci
Copy link

codesandbox-ci bot commented Nov 2, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 20ad13a:

Sandbox Source
example Configuration

@CodyJasonBennett CodyJasonBennett merged commit 5debaf2 into master Nov 2, 2022
@CodyJasonBennett CodyJasonBennett deleted the fix/spread-event-types branch November 2, 2022 08:59
renovate bot added a commit to ziyadedher/ziyadedher that referenced this pull request Nov 2, 2022
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@react-three/fiber](https://togithub.com/pmndrs/react-three-fiber) |
[`8.9.0` ->
`8.9.1`](https://renovatebot.com/diffs/npm/@react-three%2ffiber/8.9.0/8.9.1)
|
[![age](https://badges.renovateapi.com/packages/npm/@react-three%2ffiber/8.9.1/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/@react-three%2ffiber/8.9.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/@react-three%2ffiber/8.9.1/compatibility-slim/8.9.0)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/@react-three%2ffiber/8.9.1/confidence-slim/8.9.0)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>pmndrs/react-three-fiber</summary>

###
[`v8.9.1`](https://togithub.com/pmndrs/react-three-fiber/releases/tag/v8.9.1)

[Compare
Source](https://togithub.com/pmndrs/react-three-fiber/compare/v8.9.0...v8.9.1)

#### What's Changed

- fix(events): type spread event props by
[@&#8203;CodyJasonBennett](https://togithub.com/CodyJasonBennett) in
[pmndrs/react-three-fiber#2608

**Full Changelog**:
pmndrs/react-three-fiber@v8.9.0...v8.9.1

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/ziyadedher/ziyadedher).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xMy4xIiwidXBkYXRlZEluVmVyIjoiMzQuMTMuMSJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
ziyadedher pushed a commit to ziyadedher/ziyadedher that referenced this pull request Dec 16, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@react-three/fiber](https://togithub.com/pmndrs/react-three-fiber) |
[`8.9.0` ->
`8.9.1`](https://renovatebot.com/diffs/npm/@react-three%2ffiber/8.9.0/8.9.1)
|
[![age](https://badges.renovateapi.com/packages/npm/@react-three%2ffiber/8.9.1/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/@react-three%2ffiber/8.9.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/@react-three%2ffiber/8.9.1/compatibility-slim/8.9.0)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/@react-three%2ffiber/8.9.1/confidence-slim/8.9.0)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>pmndrs/react-three-fiber</summary>

###
[`v8.9.1`](https://togithub.com/pmndrs/react-three-fiber/releases/tag/v8.9.1)

[Compare
Source](https://togithub.com/pmndrs/react-three-fiber/compare/v8.9.0...v8.9.1)

#### What's Changed

- fix(events): type spread event props by
[@&#8203;CodyJasonBennett](https://togithub.com/CodyJasonBennett) in
[pmndrs/react-three-fiber#2608

**Full Changelog**:
pmndrs/react-three-fiber@v8.9.0...v8.9.1

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/ziyadedher/ziyadedher).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xMy4xIiwidXBkYXRlZEluVmVyIjoiMzQuMTMuMSJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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

1 participant