about summary refs log tree commit diff
path: root/app/javascript/mastodon/features/compose/components/privacy_dropdown.js
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2022-02-12 19:00:33 +0100
committerGitHub <noreply@github.com>2022-02-12 19:00:33 +0100
commit38845592c4b4456b5b407bd320249613a0f16e13 (patch)
tree8dc58245bb15acba37c30cc9a663cb196522708d /app/javascript/mastodon/features/compose/components/privacy_dropdown.js
parentee40c2c5b0047c13e7131efc92acb4365e289272 (diff)
Fix controls for unchangeable properties on status edit not being disabled (#17531)
Fixes #17520
Diffstat (limited to 'app/javascript/mastodon/features/compose/components/privacy_dropdown.js')
-rw-r--r--app/javascript/mastodon/features/compose/components/privacy_dropdown.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/javascript/mastodon/features/compose/components/privacy_dropdown.js b/app/javascript/mastodon/features/compose/components/privacy_dropdown.js
index df59f46b3..599467cdb 100644
--- a/app/javascript/mastodon/features/compose/components/privacy_dropdown.js
+++ b/app/javascript/mastodon/features/compose/components/privacy_dropdown.js
@@ -159,6 +159,7 @@ class PrivacyDropdown extends React.PureComponent {
     onChange: PropTypes.func.isRequired,
     noDirect: PropTypes.bool,
     container: PropTypes.func,
+    disabled: PropTypes.bool,
     intl: PropTypes.object.isRequired,
   };
 
@@ -247,7 +248,7 @@ class PrivacyDropdown extends React.PureComponent {
   }
 
   render () {
-    const { value, container, intl } = this.props;
+    const { value, container, disabled, intl } = this.props;
     const { open, placement } = this.state;
 
     const valueOption = this.options.find(item => item.value === value);
@@ -267,6 +268,7 @@ class PrivacyDropdown extends React.PureComponent {
             onMouseDown={this.handleMouseDown}
             onKeyDown={this.handleButtonKeyDown}
             style={{ height: null, lineHeight: '27px' }}
+            disabled={disabled}
           />
         </div>