Skip to content
Snippets Groups Projects
Commit caeb7d20 authored by David, Sebastian's avatar David, Sebastian
Browse files

removed some redundancies

parent 3c5d495f
No related branches found
No related tags found
1 merge request!8UI Hinzufügen
......@@ -4,7 +4,6 @@ from dash import html
from dash import callback_context
from dash.dependencies import Input, Output, State
from dash.exceptions import PreventUpdate
import copy
app = dash.Dash(__name__)
......@@ -72,7 +71,6 @@ def update_input_checklist(input_value,btn1,btn2,all_inputs,selected_inputs):
changed_id = [p['prop_id'] for p in callback_context.triggered][0]
# if clear-all-button was pressed:
if 'clear-all-button' in changed_id:
app.layout['input-checklist'].options.clear()
return list(),list(),''
# if clear-selected-button was pressed:
if 'clear-selected-button' in changed_id:
......@@ -83,7 +81,6 @@ def update_input_checklist(input_value,btn1,btn2,all_inputs,selected_inputs):
app.layout['input-checklist'].options.clear()
return list(),list(),''
# when a new element is added via dcc.Input
options = copy.copy(app.layout['input-checklist'].options)
options = all_inputs
currValues = [x['value'] for x in options]
if input_value not in currValues:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment