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

TS issue, setting a default prop without position #952

Open
Bastorx opened this issue Oct 10, 2024 · 0 comments
Open

TS issue, setting a default prop without position #952

Bastorx opened this issue Oct 10, 2024 · 0 comments

Comments

@Bastorx
Copy link

Bastorx commented Oct 10, 2024

Overview of the problem

I'm using react-rnd 10.4.11

My browser is: (No browser, it is a Typescript issue)

There is a similar issue #869 for size

Reproduced project

    <Rnd
      disableDragging={!isDraggable}
      enableResizing={isResizable}
      default={{ x: 100, y: 100 }} // Should work without default position
    >
      {...}
    </Rnd>

Description

We should be able to set a default position without size. Also, in the README.md. default props has been describe as
default: { x: number; y: number; width?: number | string; height?: number | string; };

Steps to Reproduce

  1. Try to set a props default={{ x: 100, y: 100 }} using Typescript

Expected behavior

Should not display TS error

Actual behavior

Capture d’écran 2024-10-10 à 09 24 07

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

No branches or pull requests

1 participant