mirror of
https://github.com/foss42/apidash.git
synced 2025-12-05 12:34:26 +08:00
Fix: TabBar overflow on mode change
This commit is contained in:
@@ -13,9 +13,13 @@ class EditAIRequestPane extends ConsumerWidget {
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final selectedId = ref.watch(selectedIdStateProvider);
|
||||
final codePaneVisible = ref.watch(codePaneVisibleStateProvider);
|
||||
final tabIndex = ref.watch(
|
||||
var tabIndex = ref.watch(
|
||||
selectedRequestModelProvider.select((value) => value?.requestTabIndex));
|
||||
|
||||
if (tabIndex >= 3) {
|
||||
tabIndex = 0;
|
||||
}
|
||||
|
||||
return RequestPane(
|
||||
selectedId: selectedId,
|
||||
codePaneVisible: codePaneVisible,
|
||||
|
||||
@@ -34,9 +34,10 @@ class EditGraphQLRequestPane extends ConsumerWidget {
|
||||
final hasAuth = ref.watch(selectedRequestModelProvider.select((value) =>
|
||||
value?.httpRequestModel?.authModel?.type != APIAuthType.none));
|
||||
|
||||
if (tabIndex >= 3) {
|
||||
if (tabIndex >= 4) {
|
||||
tabIndex = 0;
|
||||
}
|
||||
|
||||
return RequestPane(
|
||||
selectedId: selectedId,
|
||||
codePaneVisible: codePaneVisible,
|
||||
|
||||
Reference in New Issue
Block a user