mirror of
https://github.com/foss42/apidash.git
synced 2025-12-06 04:56:16 +08:00
fix: disable onChanged for read-only auth fields
This commit is contained in:
@@ -55,7 +55,9 @@ class _ApiKeyAuthFieldsState extends State<ApiKeyAuthFields> {
|
|||||||
],
|
],
|
||||||
tooltip: "Select where to add API key",
|
tooltip: "Select where to add API key",
|
||||||
isOutlined: true,
|
isOutlined: true,
|
||||||
onChanged: (String? newLocation) {
|
onChanged: widget.readOnly
|
||||||
|
? null
|
||||||
|
: (String? newLocation) {
|
||||||
if (newLocation != null) {
|
if (newLocation != null) {
|
||||||
setState(() {
|
setState(() {
|
||||||
_addKeyTo = newLocation;
|
_addKeyTo = newLocation;
|
||||||
|
|||||||
@@ -102,7 +102,9 @@ class _DigestAuthFieldsState extends State<DigestAuthFields> {
|
|||||||
],
|
],
|
||||||
tooltip: "Algorithm that will be used to produce the digest",
|
tooltip: "Algorithm that will be used to produce the digest",
|
||||||
isOutlined: true,
|
isOutlined: true,
|
||||||
onChanged: (String? newLocation) {
|
onChanged: widget.readOnly
|
||||||
|
? null
|
||||||
|
: (String? newLocation) {
|
||||||
if (newLocation != null) {
|
if (newLocation != null) {
|
||||||
setState(() {
|
setState(() {
|
||||||
_algorithmController = newLocation;
|
_algorithmController = newLocation;
|
||||||
|
|||||||
@@ -61,7 +61,9 @@ class _JwtAuthFieldsState extends State<JwtAuthFields> {
|
|||||||
],
|
],
|
||||||
tooltip: "Select where to add JWT token",
|
tooltip: "Select where to add JWT token",
|
||||||
isOutlined: true,
|
isOutlined: true,
|
||||||
onChanged: (String? newAddTokenTo) {
|
onChanged: widget.readOnly
|
||||||
|
? null
|
||||||
|
: (String? newAddTokenTo) {
|
||||||
if (newAddTokenTo != null) {
|
if (newAddTokenTo != null) {
|
||||||
setState(() {
|
setState(() {
|
||||||
_addTokenTo = newAddTokenTo;
|
_addTokenTo = newAddTokenTo;
|
||||||
@@ -99,7 +101,9 @@ class _JwtAuthFieldsState extends State<JwtAuthFields> {
|
|||||||
],
|
],
|
||||||
tooltip: "Select JWT algorithm",
|
tooltip: "Select JWT algorithm",
|
||||||
isOutlined: true,
|
isOutlined: true,
|
||||||
onChanged: (String? newAlgorithm) {
|
onChanged: widget.readOnly
|
||||||
|
? null
|
||||||
|
: (String? newAlgorithm) {
|
||||||
if (newAlgorithm != null) {
|
if (newAlgorithm != null) {
|
||||||
setState(() {
|
setState(() {
|
||||||
_algorithm = newAlgorithm;
|
_algorithm = newAlgorithm;
|
||||||
|
|||||||
Reference in New Issue
Block a user