diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-12-01 03:58:05 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-12-01 03:58:05 +0800 |
commit | ea11e8c62dac9ff6352bc983efc707d855b8e881 (patch) | |
tree | cdfc9ad01c2a4e56c560809cb7e01895987ef442 /packages/instant/src/components/scaling_input.tsx | |
parent | 7479a7db58f5504416a88450c92b092899bf3df3 (diff) | |
parent | a1d4aa66bc6b3de041ec6e4eb4fe40383945510b (diff) | |
download | dexon-sol-tools-ea11e8c62dac9ff6352bc983efc707d855b8e881.tar dexon-sol-tools-ea11e8c62dac9ff6352bc983efc707d855b8e881.tar.gz dexon-sol-tools-ea11e8c62dac9ff6352bc983efc707d855b8e881.tar.bz2 dexon-sol-tools-ea11e8c62dac9ff6352bc983efc707d855b8e881.tar.lz dexon-sol-tools-ea11e8c62dac9ff6352bc983efc707d855b8e881.tar.xz dexon-sol-tools-ea11e8c62dac9ff6352bc983efc707d855b8e881.tar.zst dexon-sol-tools-ea11e8c62dac9ff6352bc983efc707d855b8e881.zip |
Merge branch 'development' of https://github.com/0xProject/0x-monorepo into fix/instant/instant-bounces-on-error
Diffstat (limited to 'packages/instant/src/components/scaling_input.tsx')
-rw-r--r-- | packages/instant/src/components/scaling_input.tsx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/instant/src/components/scaling_input.tsx b/packages/instant/src/components/scaling_input.tsx index 129162a74..791692257 100644 --- a/packages/instant/src/components/scaling_input.tsx +++ b/packages/instant/src/components/scaling_input.tsx @@ -98,6 +98,12 @@ export class ScalingInput extends React.Component<ScalingInputProps, ScalingInpu inputWidthPx: this._getInputWidthInPx(), }; } + public componentDidMount(): void { + // Trigger an initial notification of the calculated fontSize. + const currentPhase = ScalingInput.getPhaseFromProps(this.props); + const currentFontSize = ScalingInput.calculateFontSizeFromProps(this.props, currentPhase); + this.props.onFontSizeChange(currentFontSize); + } public componentDidUpdate( prevProps: ScalingInputProps, prevState: ScalingInputState, |