mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 17:08:34 +00:00
fix: not able to save datasource + module option shown in create app dropdown (#9308)
This commit is contained in:
parent
3590171356
commit
2a8d672ee0
2 changed files with 6 additions and 10 deletions
|
|
@ -21,14 +21,17 @@ import { withTranslation, useTranslation } from 'react-i18next';
|
|||
import { camelizeKeys, decamelizeKeys } from 'humps';
|
||||
import { ButtonSolid } from '@/_ui/AppButton/AppButton';
|
||||
import SolidIcon from '@/_ui/Icon/SolidIcons';
|
||||
import { useAppVersionStore } from '@/_stores/appVersionStore';
|
||||
import { ConfirmDialog } from '@/_components';
|
||||
import { deepEqual } from '../../_helpers/utils';
|
||||
import { shallow } from 'zustand/shallow';
|
||||
import { useDataSourcesStore } from '../../_stores/dataSourcesStore';
|
||||
import { withRouter } from '@/_hoc/withRouter';
|
||||
import { useSuperStore } from '@/_stores/superStore';
|
||||
import { ModuleContext } from '@/_contexts/ModuleContext';
|
||||
|
||||
class DataSourceManagerComponent extends React.Component {
|
||||
static contextType = ModuleContext;
|
||||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
|
|
@ -38,7 +41,6 @@ class DataSourceManagerComponent extends React.Component {
|
|||
let options = {};
|
||||
let dataSourceMeta = {};
|
||||
let datasourceName = '';
|
||||
|
||||
if (props.selectedDataSource) {
|
||||
selectedDataSource = props.selectedDataSource;
|
||||
options = selectedDataSource.options;
|
||||
|
|
@ -197,7 +199,8 @@ class DataSourceManagerComponent extends React.Component {
|
|||
const name = selectedDataSource.name;
|
||||
const kind = selectedDataSource.kind;
|
||||
const pluginId = selectedDataSourcePluginId;
|
||||
const appVersionId = useAppVersionStore?.getState()?.editingVersion?.id;
|
||||
const appVersionId = useSuperStore.getState().modules[this.context].useAppVersionStore?.getState()
|
||||
?.editingVersion?.id;
|
||||
const currentEnvironment = this.props.currentEnvironment?.id;
|
||||
const scope = this.state?.scope || selectedDataSource?.scope;
|
||||
|
||||
|
|
|
|||
|
|
@ -800,13 +800,6 @@ class HomePageComponent extends React.Component {
|
|||
data-cy="import-option-input"
|
||||
/>
|
||||
</label>
|
||||
<Dropdown.Item
|
||||
className="homepage-dropdown-style tj-text tj-text-xsm"
|
||||
onClick={() => this.setState({ showCreateModuleModal: true })}
|
||||
data-cy="create-module-button"
|
||||
>
|
||||
{this.props.t('homePage.header.createModule', 'Create module')}
|
||||
</Dropdown.Item>
|
||||
</Dropdown.Menu>
|
||||
</Dropdown>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue