Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
purescript-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
142
Issues
142
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
purescript-gargantext
Commits
2e02f0f5
Commit
2e02f0f5
authored
Jul 21, 2021
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[upload] fix default upload type value
parent
494295c0
Pipeline
#1641
canceled with stage
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
Upload.purs
...Gargantext/Components/Forest/Tree/Node/Action/Upload.purs
+6
-2
No files found.
src/Gargantext/Components/Forest/Tree/Node/Action/Upload.purs
View file @
2e02f0f5
...
...
@@ -375,8 +375,9 @@ uploadTermListViewCpt :: R.Component Props
uploadTermListViewCpt = here.component "uploadTermListView" cpt
where
cpt {dispatch, id, nodeType} _ = do
let defaultUploadType = JSON
mFile <- T.useBox (Nothing :: Maybe UploadFile)
uploadType <- T.useBox
CSV
uploadType <- T.useBox
defaultUploadType
let input = H.input { type: "file"
, placeholder: "Choose file"
...
...
@@ -387,7 +388,7 @@ uploadTermListViewCpt = here.component "uploadTermListView" cpt
let opt fileType = H.option { value: show fileType } [ H.text $ show fileType ]
let uploadTypeHtml = R2.select { className: "form-control"
, defaultValue: show
JSON
, defaultValue: show
defaultUploadType
, on: { change: onUploadTypeChange uploadType } } (opt <$> [ CSV, JSON ])
let footer = H.div {} [ uploadTermButton { dispatch
...
...
@@ -447,6 +448,9 @@ uploadTermButtonCpt = here.component "uploadTermButton" cpt
mFile' <- T.useLive T.unequal mFile
uploadType' <- T.useLive T.unequal uploadType
R.useEffect' $ do
here.log2 "[uploadTermButton] uploadType'" uploadType'
let disabled = case mFile' of
Nothing -> "1"
Just _ -> ""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment