Add function `updateSize` to component to fix #6