mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 17:31:56 +03:00
console: disable renaming action relationships (#4072)
This commit is contained in:
parent
36c92db991
commit
029bda1bd3
@ -16,6 +16,7 @@
|
||||
|
||||
### Other changes
|
||||
|
||||
- console: disable editing action relationships
|
||||
- cli: fix typo in cli example for squash (fix #4047) (#4049)
|
||||
- console: fix run_sql migration modal messaging (close #4020) (#4060)
|
||||
- docs: add note on pg versions for actions (#4034)
|
||||
|
@ -118,6 +118,15 @@ const RelationshipEditor = ({
|
||||
|
||||
// rel name input
|
||||
const getRelNameInput = () => {
|
||||
/*
|
||||
There is no neat solution to renaming a relationship.
|
||||
This is because name is the only unique identifier of a relationship.
|
||||
TODO FIXME
|
||||
*/
|
||||
const isDisabled = !!existingRelConfig;
|
||||
const relNameInputTitle = isDisabled
|
||||
? 'A relationship cannot be renamed. Please drop and re-create if you really must.'
|
||||
: undefined;
|
||||
return (
|
||||
<div className={`${styles.add_mar_bottom}`}>
|
||||
<div className={`${styles.add_mar_bottom_mid}`}>
|
||||
@ -129,6 +138,8 @@ const RelationshipEditor = ({
|
||||
className={`${styles.select} form-control ${styles.add_pad_left}`}
|
||||
placeholder="Enter relationship name"
|
||||
data-test="rel-name"
|
||||
disabled={isDisabled}
|
||||
title={relNameInputTitle}
|
||||
value={name}
|
||||
/>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user