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

oneResize inreases value only on one-two pixels at once #800

Open
MaxiFilippov opened this issue Apr 5, 2024 · 0 comments
Open

oneResize inreases value only on one-two pixels at once #800

MaxiFilippov opened this issue Apr 5, 2024 · 0 comments

Comments

@MaxiFilippov
Copy link

MaxiFilippov commented Apr 5, 2024

When I try to increase size with onResize it increases size only on one-two pixels at once no more, console.log shows width 1 or 2. With library react-resizable same problem.

function onResize(event: any, e: any, ref: any, w: any){
    let i: number = width + w.width 
     setWidth(i);
  };
<Resizable 
          size={{ width: width, height: 50 }}
          onResizeStop={onResize}

          >
          <div id={id} style={{width: width, height: 50}} className="box-border whitespace-pre-wrap break-words leading-[1.5px] absolute z-5 bg-white border-[#d9d9d9] h-[55]  border-[2px] p-3 m-2.5 flex justify-center rounded-[10px]">
          <div className="flex flex-col w-[88%]  mr-[25px]">
         
            {nameElement}
          </div>
         </Resizable>`
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