fixed removal of restrictions

This commit is contained in:
Natan Keddem
2024-05-06 18:50:44 -04:00
parent 444c2d3182
commit 2b6f0e41e6

View File

@ -48,13 +48,11 @@ class System(Tab):
with self.scroll: with self.scroll:
with ui.row() as row: with ui.row() as row:
row.tailwind.width("full").align_items("center").justify_content("between") row.tailwind.width("full").align_items("center").justify_content("between")
with ui.row() as row: self._elements[restriction] = {
row.tailwind.align_items("center") "control": el.FInput(value=restriction, read_only=True),
self._elements[restriction] = { "row": row,
"control": el.FInput(value=restriction, read_only=True), }
"row": row, self._elements[restriction]["control"].tailwind.width("[420px]")
}
self._elements[restriction]["control"].tailwind.width("[420px]")
ui.button(icon="remove", on_click=lambda _, r=restriction: remove_restriction(r)) ui.button(icon="remove", on_click=lambda _, r=restriction: remove_restriction(r))
if self.type not in storage.answer(self.answer): if self.type not in storage.answer(self.answer):
storage.answer(self.answer)[self.type] = [] storage.answer(self.answer)[self.type] = []