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

Sort drop down list #36

Merged
merged 1 commit into from
Jun 1, 2021
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
9 changes: 5 additions & 4 deletions src/Page/MoleculeBrowser/SortedAll.purs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ module Page.MoleculeBrowser.SortedAll

import Prelude
import Data.Array as Array
import Data.String as String
import PageKind (PageKind)
import PageKind as PageKind
import SortType (SortType)
Expand Down Expand Up @@ -196,7 +197,7 @@ props :: forall a r. ActionCreators a r -> Model -> Props a
props actionCreators model@{ twoDViewer: true, threeDViewer: true } =
Props.AllViewers $
{ sortButton: SortButton.props
model.valueCollections
(Array.sortWith String.toLower model.valueCollections)
(onSetSorted actionCreators model)
(onSetUnsorted actionCreators model)

Expand Down Expand Up @@ -261,7 +262,7 @@ props actionCreators model@{ twoDViewer: true, threeDViewer: true } =
props actionCreators model@{ twoDViewer: false, threeDViewer: true } =
Props.ThreeDViewer $
{ sortButton: SortButton.props
model.valueCollections
(Array.sortWith String.toLower model.valueCollections)
(onSetSorted actionCreators model)
(onSetUnsorted actionCreators model)

Expand Down Expand Up @@ -324,7 +325,7 @@ props actionCreators model@{ twoDViewer: false, threeDViewer: true } =
props actionCreators model@{ twoDViewer: true, threeDViewer: false } =
Props.TwoDViewer $
{ sortButton: SortButton.props
model.valueCollections
(Array.sortWith String.toLower model.valueCollections)
(onSetSorted actionCreators model)
(onSetUnsorted actionCreators model)

Expand Down Expand Up @@ -387,7 +388,7 @@ props actionCreators model@{ twoDViewer: true, threeDViewer: false } =
props actionCreators model@{ twoDViewer: false, threeDViewer: false } =
Props.NoViewers $
{ sortButton: SortButton.props
model.valueCollections
(Array.sortWith String.toLower model.valueCollections)
(onSetSorted actionCreators model)
(onSetUnsorted actionCreators model)

Expand Down
9 changes: 5 additions & 4 deletions src/Page/MoleculeBrowser/SortedBuildingBlocks.purs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ module Page.MoleculeBrowser.SortedBuildingBlocks

import Prelude
import Data.Array as Array
import Data.String as String
import PageKind (PageKind)
import PageKind as PageKind
import SortType (SortType)
Expand Down Expand Up @@ -196,7 +197,7 @@ props :: forall a r. ActionCreators a r -> Model -> Props a
props actionCreators model@{ twoDViewer: true, threeDViewer: true } =
Props.AllViewers $
{ sortButton: SortButton.props
model.valueCollections
(Array.sortWith String.toLower model.valueCollections)
(onSetSorted actionCreators model)
(onSetUnsorted actionCreators model)

Expand Down Expand Up @@ -261,7 +262,7 @@ props actionCreators model@{ twoDViewer: true, threeDViewer: true } =
props actionCreators model@{ twoDViewer: false, threeDViewer: true } =
Props.ThreeDViewer $
{ sortButton: SortButton.props
model.valueCollections
(Array.sortWith String.toLower model.valueCollections)
(onSetSorted actionCreators model)
(onSetUnsorted actionCreators model)

Expand Down Expand Up @@ -324,7 +325,7 @@ props actionCreators model@{ twoDViewer: false, threeDViewer: true } =
props actionCreators model@{ twoDViewer: true, threeDViewer: false } =
Props.TwoDViewer $
{ sortButton: SortButton.props
model.valueCollections
(Array.sortWith String.toLower model.valueCollections)
(onSetSorted actionCreators model)
(onSetUnsorted actionCreators model)

Expand Down Expand Up @@ -387,7 +388,7 @@ props actionCreators model@{ twoDViewer: true, threeDViewer: false } =
props actionCreators model@{ twoDViewer: false, threeDViewer: false } =
Props.NoViewers $
{ sortButton: SortButton.props
model.valueCollections
(Array.sortWith String.toLower model.valueCollections)
(onSetSorted actionCreators model)
(onSetUnsorted actionCreators model)

Expand Down
9 changes: 5 additions & 4 deletions src/Page/MoleculeBrowser/SortedConstructedMolecules.purs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ module Page.MoleculeBrowser.SortedConstructedMolecules

import Prelude
import Data.Array as Array
import Data.String as String
import PageKind (PageKind)
import PageKind as PageKind
import SortType (SortType)
Expand Down Expand Up @@ -197,7 +198,7 @@ props :: forall a r. ActionCreators a r -> Model -> Props a
props actionCreators model@{ twoDViewer: true, threeDViewer: true } =
Props.AllViewers $
{ sortButton: SortButton.props
model.valueCollections
(Array.sortWith String.toLower model.valueCollections)
(onSetSorted actionCreators model)
(onSetUnsorted actionCreators model)

Expand Down Expand Up @@ -262,7 +263,7 @@ props actionCreators model@{ twoDViewer: true, threeDViewer: true } =
props actionCreators model@{ twoDViewer: false, threeDViewer: true } =
Props.ThreeDViewer $
{ sortButton: SortButton.props
model.valueCollections
(Array.sortWith String.toLower model.valueCollections)
(onSetSorted actionCreators model)
(onSetUnsorted actionCreators model)

Expand Down Expand Up @@ -325,7 +326,7 @@ props actionCreators model@{ twoDViewer: false, threeDViewer: true } =
props actionCreators model@{ twoDViewer: true, threeDViewer: false } =
Props.TwoDViewer $
{ sortButton: SortButton.props
model.valueCollections
(Array.sortWith String.toLower model.valueCollections)
(onSetSorted actionCreators model)
(onSetUnsorted actionCreators model)

Expand Down Expand Up @@ -389,7 +390,7 @@ props actionCreators model@{ twoDViewer: true, threeDViewer: false } =
props actionCreators model@{ twoDViewer: false, threeDViewer: false } =
Props.NoViewers $
{ sortButton: SortButton.props
model.valueCollections
(Array.sortWith String.toLower model.valueCollections)
(onSetSorted actionCreators model)
(onSetUnsorted actionCreators model)

Expand Down
9 changes: 5 additions & 4 deletions src/Page/MoleculeBrowser/UnsortedAll.purs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ module Page.MoleculeBrowser.UnsortedAll

import Prelude
import Data.Array as Array
import Data.String as String
import PageKind (PageKind)
import PageKind as PageKind
import SortType (SortType)
Expand Down Expand Up @@ -171,7 +172,7 @@ props :: forall a r. ActionCreators a r -> Model -> Props a
props actionCreators model@{ twoDViewer: true, threeDViewer: true } =
Props.AllViewers $
{ sortButton: SortButton.props
model.valueCollections
(Array.sortWith String.toLower model.valueCollections)
(setSorted actionCreators model)
(setUnsorted actionCreators model)

Expand Down Expand Up @@ -237,7 +238,7 @@ props actionCreators model@{ twoDViewer: true, threeDViewer: true } =
props actionCreators model@{ twoDViewer: false, threeDViewer: true } =
Props.ThreeDViewer $
{ sortButton: SortButton.props
model.valueCollections
(Array.sortWith String.toLower model.valueCollections)
(setSorted actionCreators model)
(setUnsorted actionCreators model)

Expand Down Expand Up @@ -300,7 +301,7 @@ props actionCreators model@{ twoDViewer: false, threeDViewer: true } =
props actionCreators model@{ twoDViewer: true, threeDViewer: false } =
Props.TwoDViewer $
{ sortButton: SortButton.props
model.valueCollections
(Array.sortWith String.toLower model.valueCollections)
(setSorted actionCreators model)
(setUnsorted actionCreators model)

Expand Down Expand Up @@ -363,7 +364,7 @@ props actionCreators model@{ twoDViewer: true, threeDViewer: false } =
props actionCreators model@{ twoDViewer: false, threeDViewer: false } =
Props.NoViewers $
{ sortButton: SortButton.props
model.valueCollections
(Array.sortWith String.toLower model.valueCollections)
(setSorted actionCreators model)
(setUnsorted actionCreators model)

Expand Down
9 changes: 5 additions & 4 deletions src/Page/MoleculeBrowser/UnsortedBuildingBlocks.purs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ module Page.MoleculeBrowser.UnsortedBuildingBlocks

import Prelude
import Data.Array as Array
import Data.String as String
import PageKind (PageKind)
import PageKind as PageKind
import SortType (SortType)
Expand Down Expand Up @@ -171,7 +172,7 @@ props :: forall a r. ActionCreators a r -> Model -> Props a
props actionCreators model@{ twoDViewer: true, threeDViewer: true} =
Props.AllViewers $
{ sortButton: SortButton.props
model.valueCollections
(Array.sortWith String.toLower model.valueCollections)
(setSorted actionCreators model)
(setUnsorted actionCreators model)

Expand Down Expand Up @@ -236,7 +237,7 @@ props actionCreators model@{ twoDViewer: true, threeDViewer: true} =
props actionCreators model@{ twoDViewer: false, threeDViewer: true} =
Props.ThreeDViewer $
{ sortButton: SortButton.props
model.valueCollections
(Array.sortWith String.toLower model.valueCollections)
(setSorted actionCreators model)
(setUnsorted actionCreators model)

Expand Down Expand Up @@ -299,7 +300,7 @@ props actionCreators model@{ twoDViewer: false, threeDViewer: true} =
props actionCreators model@{ twoDViewer: true, threeDViewer: false} =
Props.TwoDViewer $
{ sortButton: SortButton.props
model.valueCollections
(Array.sortWith String.toLower model.valueCollections)
(setSorted actionCreators model)
(setUnsorted actionCreators model)

Expand Down Expand Up @@ -362,7 +363,7 @@ props actionCreators model@{ twoDViewer: true, threeDViewer: false} =
props actionCreators model@{ twoDViewer: false, threeDViewer: false} =
Props.NoViewers $
{ sortButton: SortButton.props
model.valueCollections
(Array.sortWith String.toLower model.valueCollections)
(setSorted actionCreators model)
(setUnsorted actionCreators model)

Expand Down
9 changes: 5 additions & 4 deletions src/Page/MoleculeBrowser/UnsortedConstructedMolecules.purs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ module Page.MoleculeBrowser.UnsortedConstructedMolecules

import Prelude
import Data.Array as Array
import Data.String as String
import PageKind (PageKind)
import PageKind as PageKind
import SortType (SortType)
Expand Down Expand Up @@ -174,7 +175,7 @@ props :: forall a r. ActionCreators a r -> Model -> Props a
props actionCreators model@{ twoDViewer: true, threeDViewer: true } =
Props.AllViewers $
{ sortButton: SortButton.props
model.valueCollections
(Array.sortWith String.toLower model.valueCollections)
(setSorted actionCreators model)
(setUnsorted actionCreators model)

Expand Down Expand Up @@ -239,7 +240,7 @@ props actionCreators model@{ twoDViewer: true, threeDViewer: true } =
props actionCreators model@{ twoDViewer: false, threeDViewer: true } =
Props.ThreeDViewer $
{ sortButton: SortButton.props
model.valueCollections
(Array.sortWith String.toLower model.valueCollections)
(setSorted actionCreators model)
(setUnsorted actionCreators model)

Expand Down Expand Up @@ -302,7 +303,7 @@ props actionCreators model@{ twoDViewer: false, threeDViewer: true } =
props actionCreators model@{ twoDViewer: true, threeDViewer: false } =
Props.TwoDViewer $
{ sortButton: SortButton.props
model.valueCollections
(Array.sortWith String.toLower model.valueCollections)
(setSorted actionCreators model)
(setUnsorted actionCreators model)

Expand Down Expand Up @@ -365,7 +366,7 @@ props actionCreators model@{ twoDViewer: true, threeDViewer: false } =
props actionCreators model@{ twoDViewer: false, threeDViewer: false } =
Props.NoViewers $
{ sortButton: SortButton.props
model.valueCollections
(Array.sortWith String.toLower model.valueCollections)
(setSorted actionCreators model)
(setUnsorted actionCreators model)

Expand Down