mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 17:08:34 +00:00
Bug: 11342 - Edit Version Modal: Save CTA Disable Fix (#11349)
* Bug: 11342 - Edit Version Modal: Disabled Save if no versionName present in input field * Added check for Save CTA: new versionName same as current version name
This commit is contained in:
parent
b3a82e45ab
commit
4315bff421
1 changed files with 3 additions and 2 deletions
|
|
@ -1,9 +1,9 @@
|
|||
import React, { useState } from 'react';
|
||||
import { useEnvironmentsAndVersionsStore } from '@/_stores/environmentsAndVersionsStore';
|
||||
import AlertDialog from '@/_ui/AlertDialog';
|
||||
import React, { useState } from 'react';
|
||||
import { toast } from 'react-hot-toast';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { shallow } from 'zustand/shallow';
|
||||
import { useEnvironmentsAndVersionsStore } from '@/_stores/environmentsAndVersionsStore';
|
||||
|
||||
export const EditVersion = ({ appId, setShowEditAppVersion, showEditAppVersion }) => {
|
||||
const [isEditingVersion, setIsEditingVersion] = useState(false);
|
||||
|
|
@ -87,6 +87,7 @@ export const EditVersion = ({ appId, setShowEditAppVersion, showEditAppVersion }
|
|||
{t('globals.cancel', 'Cancel')}
|
||||
</button>
|
||||
<button
|
||||
disabled={!versionName || versionName === editingVersion?.name}
|
||||
className={`btn btn-primary ${isEditingVersion ? 'btn-loading' : ''}`}
|
||||
data-cy="save-button"
|
||||
type="submit"
|
||||
|
|
|
|||
Loading…
Reference in a new issue