mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-02-04 09:23:19 +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
|
// Show fields depending on selected login method
|
||||||
if (_method == LoginMethod.credentials) ...[
|
if (_method == LoginMethod.credentials) ...[
|
||||||
TextFormField(
|
TextFormField(
|
||||||
|
key: ValueKey("input-username"),
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
labelText: L10().username,
|
labelText: L10().username,
|
||||||
labelStyle: TextStyle(fontWeight: FontWeight.bold),
|
labelStyle: TextStyle(fontWeight: FontWeight.bold),
|
||||||
|
|
@ -184,6 +185,7 @@ class _InvenTreeLoginState extends State<InvenTreeLoginWidget> {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
TextFormField(
|
TextFormField(
|
||||||
|
key: ValueKey("input-password"),
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
labelText: L10().password,
|
labelText: L10().password,
|
||||||
labelStyle: TextStyle(fontWeight: FontWeight.bold),
|
labelStyle: TextStyle(fontWeight: FontWeight.bold),
|
||||||
|
|
@ -215,6 +217,7 @@ class _InvenTreeLoginState extends State<InvenTreeLoginWidget> {
|
||||||
),
|
),
|
||||||
] else ...[
|
] else ...[
|
||||||
TextFormField(
|
TextFormField(
|
||||||
|
key: ValueKey("input-token"),
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
labelText: L10().token,
|
labelText: L10().token,
|
||||||
labelStyle: TextStyle(fontWeight: FontWeight.bold),
|
labelStyle: TextStyle(fontWeight: FontWeight.bold),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue