From 6e8f84325292c9dce2af8de1fb435d547ccd9f98 Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Fri, 14 Mar 2025 18:54:31 -0500 Subject: [PATCH] Create management portal in Flutter #39 --- web/repertory/lib/screens/add_mount_screen.dart | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/web/repertory/lib/screens/add_mount_screen.dart b/web/repertory/lib/screens/add_mount_screen.dart index 87a0c844..ae2fa1a4 100644 --- a/web/repertory/lib/screens/add_mount_screen.dart +++ b/web/repertory/lib/screens/add_mount_screen.dart @@ -67,7 +67,9 @@ class _AddMountScreenState extends State { const SizedBox(width: constants.padding), DropdownButton( value: _mountType, - onChanged: (mountType) => _handleChange(mountType ?? ''), + onChanged: (mountType) { + _handleChange(mountType ?? ''); + }, items: constants.providerTypeList .map>((item) { @@ -187,6 +189,12 @@ class _AddMountScreenState extends State { void _handleChange(String mountType) { setState(() { _mountType = mountType; + if (_mountType == "Sia" && _mountNameController.text.isEmpty) { + _mountNameController.text = 'default'; + } else { + _mountNameController.text = ''; + } + _mount = (_mountNameController.text.isEmpty) ? null