mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-02-04 11:13:17 +00:00
Fix input field value when switching login method by setting keys
This commit is contained in:
parent
0b8020d06d
commit
3b05b6fe54
1 changed files with 3 additions and 0 deletions
|
|
@ -165,6 +165,7 @@ class _InvenTreeLoginState extends State<InvenTreeLoginWidget> {
|
|||
// Show fields depending on selected login method
|
||||
if (_method == LoginMethod.credentials) ...[
|
||||
TextFormField(
|
||||
key: ValueKey("input-username"),
|
||||
decoration: InputDecoration(
|
||||
labelText: L10().username,
|
||||
labelStyle: TextStyle(fontWeight: FontWeight.bold),
|
||||
|
|
@ -184,6 +185,7 @@ class _InvenTreeLoginState extends State<InvenTreeLoginWidget> {
|
|||
},
|
||||
),
|
||||
TextFormField(
|
||||
key: ValueKey("input-password"),
|
||||
decoration: InputDecoration(
|
||||
labelText: L10().password,
|
||||
labelStyle: TextStyle(fontWeight: FontWeight.bold),
|
||||
|
|
@ -215,6 +217,7 @@ class _InvenTreeLoginState extends State<InvenTreeLoginWidget> {
|
|||
),
|
||||
] else ...[
|
||||
TextFormField(
|
||||
key: ValueKey("input-token"),
|
||||
decoration: InputDecoration(
|
||||
labelText: L10().token,
|
||||
labelStyle: TextStyle(fontWeight: FontWeight.bold),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue