From bd4c34f56e01e7e2b5418d1fa71cde029c71a7b2 Mon Sep 17 00:00:00 2001 From: vicky-primathon <67091118+vicky-primathon@users.noreply.github.com> Date: Tue, 11 Aug 2020 16:31:34 +0530 Subject: [PATCH] Sorted widget names in lightning menu (#263) --- .../src/components/editorComponents/LightningMenu/helpers.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/client/src/components/editorComponents/LightningMenu/helpers.tsx b/app/client/src/components/editorComponents/LightningMenu/helpers.tsx index 5bacc9f15f..9f4df2fcdb 100644 --- a/app/client/src/components/editorComponents/LightningMenu/helpers.tsx +++ b/app/client/src/components/editorComponents/LightningMenu/helpers.tsx @@ -16,7 +16,6 @@ import { LIGHTNING_MENU_DATA_WIDGET, LIGHTNING_MENU_OPTION_HTML, LIGHTNING_MENU_OPTION_JS, - LIGHTNING_MENU_OPTION_TEXT, LIGHTNING_MENU_QUERY_CREATE_NEW, LIGHTNING_MENU_API_CREATE_NEW, } from "constants/messages"; @@ -192,6 +191,9 @@ export const getLightningMenuOptions = ( }, ]; if (widgets.length > 0) { + widgets = widgets.sort((a: WidgetProps, b: WidgetProps) => { + return a.widgetName.toUpperCase() > b.widgetName.toUpperCase() ? 1 : -1; + }); options.push({ content: (