Skip to content
Snippets Groups Projects
Commit 029b54fb authored by Allen Gilliland's avatar Allen Gilliland
Browse files

tweak the field ordering so that segments go on top of custom fields

parent 77652911
No related branches found
No related tags found
No related merge requests found
......@@ -49,19 +49,19 @@ export default class FieldList extends Component {
let tableName = tableMetadata.display_name;
let specialOptions = [];
if (customFieldOptions) {
specialOptions = Object.keys(customFieldOptions).map(name => ({
name: name,
value: ["expression", name],
customField: customFieldOptions[name]
}));
}
if (segmentOptions) {
specialOptions = specialOptions.concat(segmentOptions.map(segment => ({
specialOptions = segmentOptions.map(segment => ({
name: segment.name,
value: ["SEGMENT", segment.id],
segment: segment
}));
}
if (customFieldOptions) {
specialOptions = specialOptions.concat(Object.keys(customFieldOptions).map(name => ({
name: name,
value: ["expression", name],
customField: customFieldOptions[name]
})));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment