diff --git a/packages/bbui/src/Tabs/Tabs.svelte b/packages/bbui/src/Tabs/Tabs.svelte index c801ff44fd..235e103bb1 100644 --- a/packages/bbui/src/Tabs/Tabs.svelte +++ b/packages/bbui/src/Tabs/Tabs.svelte @@ -11,6 +11,8 @@ export let quiet = false export let emphasized = false + let thisSelected = undefined + let _id = id() const tab = writable({ title: selected, id: _id, emphasized }) setContext("tab", tab) @@ -20,9 +22,18 @@ const dispatch = createEventDispatcher() $: { - if ($tab.title !== selected) { - selected = $tab.title - dispatch("select", selected) + if (thisSelected !== selected) { + thisSelected = selected + dispatch("select", thisSelected) + } else if ($tab.title !== thisSelected) { + thisSelected = $tab.title + dispatch("select", thisSelected) + } + if ($tab.title !== thisSelected) { + tab.update(state => { + state.title = thisSelected + return state + }) } } diff --git a/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/rest/[query]/index.svelte b/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/rest/[query]/index.svelte index 604ce22c22..64572280ca 100644 --- a/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/rest/[query]/index.svelte +++ b/packages/builder/src/pages/builder/app/[application]/data/datasource/[selectedDatasource]/rest/[query]/index.svelte @@ -124,6 +124,7 @@ notifications.info("Request did not return any data.") } else { response.info = response.info || { code: 200 } + schema = response.schema notifications.success("Request sent successfully.") } } catch (err) { @@ -243,7 +244,7 @@