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

Added placeholder to use . in group #1423

Merged
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
8 changes: 4 additions & 4 deletions web/client/components/TOC/fragments/settings/General.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ const General = React.createClass({
},
getGroups(groups, idx = 0) {
return groups.filter((group) => group.nodes).reduce((acc, g) => {
acc.push({label: g.id.replace(/\./g, '/'), value: g.id});
acc.push({label: g.id.replace(/\./g, '/').replace(/\${dot}/g, '.'), value: g.id});
if (g.nodes.length > 0) {
return acc.concat(this.getGroups(g.nodes, idx + 1));
}
return acc;
}, []);
},
getLabelName(groupLable = "") {
return groupLable.replace(/\./g, '/');
return groupLable.replace(/\./g, '/').replace(/\${dot}/g, '.');
},
render() {
return (<form ref="settings">
Expand Down Expand Up @@ -81,8 +81,8 @@ const General = React.createClass({
})).indexOf(search) > -1) {
return null;
}
const val = search.replace(/\//g, '.');
return {label: val, value: val};
const val = search.replace(/\./g, '${dot}').replace(/\//g, '.');
return {label: search, value: val};
}}

onValueChange={function(item) {
Expand Down
2 changes: 1 addition & 1 deletion web/client/utils/LayersUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ const reorderLayers = (groups, allLayers) => {
const createGroup = (groupId, groupName, layers, addLayers) => {
return assign({}, {
id: groupId,
title: (groupName || "").replace(/\${dot}/g, "."),
name: groupName,
title: groupName,
nodes: addLayers ? getLayersId(groupId, layers) : [],
expanded: true
});
Expand Down