Skip to content

Commit

Permalink
address pr feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
miles-grant-ibigroup committed Oct 6, 2023
1 parent 5727f21 commit 533991e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions i18n/english.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ components:
CustomCSVForm:
numLines: "%numLines% lines."
csvInvalid: CSV invalid!
uploading: Uploading...
DatatoolsNavbar:
account: My Account
alerts: Alerts
Expand Down
1 change: 1 addition & 0 deletions i18n/german.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1495,6 +1495,7 @@ components:
CustomCSVForm:
numLines: "%numLines% lines."
csvInvalid: CSV ungültig!
uploading: Uploading...
FeedTransformationErrors:
csvMissingName: Custom CSV must have a name.
csvNameContainsTxt: Custom CSV name cannot contain .txt
Expand Down
1 change: 1 addition & 0 deletions i18n/polish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ components:
CustomCSVForm:
numLines: "%numLines% lines."
csvInvalid: CSV ungültig!
uploading: Uploading...
DatatoolsNavbar:
account: Moje konto
alerts: Alerty
Expand Down
5 changes: 3 additions & 2 deletions lib/manager/components/transform/CustomCSVForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const CustomCSVForm = (props: Props) => {
}}
>
{headerText}
<textarea
{numLines < 600000 && <textarea
id='csvData'
name={name}
onChange={onChangeCsvData}
Expand All @@ -71,14 +71,15 @@ const CustomCSVForm = (props: Props) => {
whiteSpace: 'pre',
width: '400px'
}}
value={csvData} />
value={csvData} />}
</label>
<div style={{marginBottom: '10px'}}>
<input
type='file'
name='file'
onChange={(e) => {
if (e.target && e.target.files.length > 0) {
onChangeCsvData({target: {name, value: messages('uploading')}})
const reader = new FileReader()
reader.onload = fileContents => {
onChangeCsvData({target: {name, value: fileContents.target.result}})
Expand Down

0 comments on commit 533991e

Please sign in to comment.