Adding apisSorter options, taking a string or a function as a configuration value

This commit is contained in:
Raphaël MARQUES
2017-06-27 15:29:07 +02:00
parent 96673d1376
commit 4fe27786f4
5 changed files with 67 additions and 53 deletions

View File

@@ -562,8 +562,11 @@ export const sorters = {
operationsSorter: {
alpha: (a, b) => a.get("path").localeCompare(b.get("path")),
method: (a, b) => a.get("method").localeCompare(b.get("method"))
},
apisSorter: {
alpha: (a, b) => a.getIn([0, "operation", "tags", 0]).localeCompare(b.getIn([0, "operation", "tags", 0]))
}
}
};
export const buildFormData = (data) => {
let formArr = []