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
Added the reorder functionality to storage in the side navigation #2665
base: master
Are you sure you want to change the base?
Conversation
browser/main/SideNav/index.js
Outdated
@@ -262,11 +274,13 @@ class SideNav extends React.Component { | |||
const { data, location, config, dispatch } = this.props | |||
|
|||
const isFolded = config.isSideNavFolded | |||
|
|||
let itemIndex = -1 | |||
const storageList = data.storageMap.map((storage, key) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain how can you use the map
function here? I thought storageMap
was a map and it doesn't have map
function? The feature works great, but I'm not quite understand there 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the storageMap was a map, but it is not the javascript built-in map, it was the MutableMap from Dick Choi and it provides the map function, please refer here: MutableMap
a43359d
to
253480b
Compare
@richardtks Could you provide an example of how this is handled when the sidebar is collapsed? |
253480b
to
3be7d9c
Compare
@Flexo013, For the collapsed side bar, re-order is not allowed as the there is no space for the handler to show in the side navigation. |
Description
Screenshot
Issue fixed
#1910
Type of changes
Checklist: