Sort headers when displaying them
Summary: It's easier to scan the same header value of multiple requests when it's in roughly the same place for each one. Reviewed By: mweststrate Differential Revision: D24885172 fbshipit-source-id: 7be02903d2f9f79c8ba618e57c74169392f6244b
This commit is contained in:
committed by
Facebook GitHub Bot
parent
a9ac4da146
commit
fd8065eb7a
@@ -271,7 +271,9 @@ class HeaderInspector extends Component<
|
|||||||
);
|
);
|
||||||
|
|
||||||
const rows: any = [];
|
const rows: any = [];
|
||||||
computedHeaders.forEach((value: string, key: string) => {
|
Array.from(computedHeaders.entries())
|
||||||
|
.sort((a, b) => (a[0] < b[0] ? -1 : a[0] == b[0] ? 0 : 1))
|
||||||
|
.forEach(([key, value]) => {
|
||||||
rows.push({
|
rows.push({
|
||||||
columns: {
|
columns: {
|
||||||
key: {
|
key: {
|
||||||
|
|||||||
Reference in New Issue
Block a user