Fix: TabBar overflow on mode change

This commit is contained in:
Manan Gandhi
2025-11-27 19:33:43 +05:30
parent 69fba11078
commit 5af87725eb
2 changed files with 7 additions and 2 deletions

View File

@@ -13,8 +13,12 @@ class EditAIRequestPane extends ConsumerWidget {
Widget build(BuildContext context, WidgetRef ref) { Widget build(BuildContext context, WidgetRef ref) {
final selectedId = ref.watch(selectedIdStateProvider); final selectedId = ref.watch(selectedIdStateProvider);
final codePaneVisible = ref.watch(codePaneVisibleStateProvider); final codePaneVisible = ref.watch(codePaneVisibleStateProvider);
final tabIndex = ref.watch( var tabIndex = ref.watch(
selectedRequestModelProvider.select((value) => value?.requestTabIndex)); selectedRequestModelProvider.select((value) => value?.requestTabIndex));
if (tabIndex >= 3) {
tabIndex = 0;
}
return RequestPane( return RequestPane(
selectedId: selectedId, selectedId: selectedId,

View File

@@ -34,9 +34,10 @@ class EditGraphQLRequestPane extends ConsumerWidget {
final hasAuth = ref.watch(selectedRequestModelProvider.select((value) => final hasAuth = ref.watch(selectedRequestModelProvider.select((value) =>
value?.httpRequestModel?.authModel?.type != APIAuthType.none)); value?.httpRequestModel?.authModel?.type != APIAuthType.none));
if (tabIndex >= 3) { if (tabIndex >= 4) {
tabIndex = 0; tabIndex = 0;
} }
return RequestPane( return RequestPane(
selectedId: selectedId, selectedId: selectedId,
codePaneVisible: codePaneVisible, codePaneVisible: codePaneVisible,