diff --git a/src/components/Dashboard/Tiles/Widgets/WidgetsEditModal.tsx b/src/components/Dashboard/Tiles/Widgets/WidgetsEditModal.tsx index 15826acb1..73a8110d3 100644 --- a/src/components/Dashboard/Tiles/Widgets/WidgetsEditModal.tsx +++ b/src/components/Dashboard/Tiles/Widgets/WidgetsEditModal.tsx @@ -58,14 +58,6 @@ export const WidgetsEditModal = ({ }); }; - const getMutliselectData = (option: string) => { - const currentWidgetDefinition = Widgets[innerProps.widgetId as keyof typeof Widgets]; - if (!Widgets) return []; - - const options = currentWidgetDefinition.options as any; - return options[option]?.data ?? []; - }; - const handleSave = () => { updateConfig( configName, @@ -85,9 +77,9 @@ export const WidgetsEditModal = ({ return ( - {items.map(([key, defaultValue], index) => { + {items.map(([key, _], index) => { const option = (currentWidgetDefinition as any).options[key] as IWidgetOptionValue; - const value = moduleProperties[key] ?? defaultValue; + const value = moduleProperties[key] ?? option.defaultValue; if (!option) { return ( @@ -183,10 +175,10 @@ function WidgetOptionTypeSwitch( case 'slider': return ( - {t(`descriptor.settings.${key}.label`)}