re-resizable icon indicating copy to clipboard operation
re-resizable copied to clipboard

oneResize inreases value only on one-two pixels at once

Open MaxiFilippov opened this issue 10 months ago • 1 comments

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>`

MaxiFilippov avatar Apr 05 '24 17:04 MaxiFilippov

I copied your example and mine is working just fine. After I stop resizing, the width logs correctly.

Can you duplicate this into something like codesandbox or playcode?

alexiz10 avatar Jun 24 '24 22:06 alexiz10