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

Fix value prop usage in NumericFormat #64

Merged
merged 1 commit into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "plain-dapp-update",
"private": true,
"version": "1.18.0",
"version": "1.18.1",
"type": "module",
"scripts": {
"dev": "npm run create-version-file && vite",
Expand Down
16 changes: 9 additions & 7 deletions src/components/organisms/swapLine/SwapLine.jsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import React, { useState, useEffect, useMemo } from 'react'
import styled from 'styled-components'
import PropTypes from 'prop-types'
import React, { useState, useEffect, useMemo } from 'react'
import { Row, Col } from 'react-bootstrap'
import { capitalizeAllLettersExceptFirst } from '../../../utils/capitalize'
import Skeleton from 'react-loading-skeleton'
import { NumericFormat } from 'react-number-format'
import AssetInfo from '../assetInfo/AssetInfo'
import Icon from '../../atoms/icon/Icon'
import styled from 'styled-components'

import { getDecimalSeparator, getThousandSeparator } from '../../../utils/amount-utils'
import Skeleton from 'react-loading-skeleton'
import { capitalizeAllLettersExceptFirst } from '../../../utils/capitalize'
import Icon from '../../atoms/icon/Icon'
import AssetInfo from '../assetInfo/AssetInfo'

import 'react-loading-skeleton/dist/skeleton.css'

const SwapLineContainer = styled.div`
Expand Down Expand Up @@ -275,7 +277,7 @@ const SwapLine = ({
disabled={disableInput}
onValueChange={(_e, _source) => onChangeAmount(_e.value.toString().replace(',', '.'), _source)}
prefix={prefix}
value={amount !== '' ? +amount : amount}
value={amount}
allowedDecimalSeparators={[',', '.']}
envin3 marked this conversation as resolved.
Show resolved Hide resolved
decimalSeparator={getDecimalSeparator()}
thousandSeparator={getThousandSeparator()}
Expand Down
Loading