mirror of
https://github.com/foss42/apidash.git
synced 2025-12-05 20:40:02 +08:00
Fix: TabBar overflow on mode change
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user