Fix token label width from updating when token size changes

This commit is contained in:
Mitchell McCaffrey 2020-09-08 14:31:44 +10:00
parent 36351efb82
commit 170a8072c5

View File

@ -19,7 +19,7 @@ function TokenLabel({ tokenState, width, height }) {
} else {
setRectWidth(0);
}
}, [tokenState.label, paddingX]);
}, [tokenState.label, paddingX, width]);
const textRef = useRef();