refinedev / refine

A React Framework for building internal tools, admin panels, dashboards & B2B apps with unmatched flexibility.
https://refine.dev
MIT License
28.64k stars 2.24k forks source link

fix(core): link component ref type is too restrictive #6464

Closed alicanerdurmaz closed 2 weeks ago

alicanerdurmaz commented 2 weeks ago

PR Checklist

Please check if your PR fulfills the following requirements:

Bugs / Features

What is the current behavior?

This will cause a type error

const MyComponent = () => {
  const ref = useRef<HTMLDivElement>(null);
  return <Link ref={ref} to="/posts" />;
};

What is the new behavior?

From now on, <Link/> can accept all valid element types

fixes #6463

Notes for reviewers

changeset-bot[bot] commented 2 weeks ago

🦋 Changeset detected

Latest commit: d8a6bc2c7925ffd50193d6aaab37c3306147b8a7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | --------------- | ----- | | @refinedev/core | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

cypress[bot] commented 2 weeks ago

refine    Run #11616

Run Properties:  status check passed Passed #11616  •  git commit 93a92bcf51 ℹ️: Merge d8a6bc2c7925ffd50193d6aaab37c3306147b8a7 into 795a9e52ee0f4ee33ea465f17e4b...
Project refine
Branch Review RK-809-core-link-component-ref-type-is-too-restrictive
Run status status check passed Passed #11616
Run duration 22m 44s
Commit git commit 93a92bcf51 ℹ️: Merge d8a6bc2c7925ffd50193d6aaab37c3306147b8a7 into 795a9e52ee0f4ee33ea465f17e4b...
Committer Alican Erdurmaz
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 31
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 83
View all changes introduced in this branch ↗︎