File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed
components/admin-toolbar-setting Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ const AdminToolbarSetting = props => {
2121 props . controls . map ( option => {
2222 const isSelected = props . value ? props . value === option . value : props . placeholder === option . value
2323 const tabindex = isSelected ? '0' : '-1'
24+ const isDisabled = props . disabledValues ? props . disabledValues . includes ( option . value ) : false
2425
2526 return < Button
2627 style = { option . selectedColor && isSelected ? { backgroundColor : option . selectedColor } : { } }
@@ -30,6 +31,7 @@ const AdminToolbarSetting = props => {
3031 tabIndex = { tabindex }
3132 aria-pressed = { isSelected }
3233 isSmall = { props . isSmall }
34+ disabled = { isDisabled }
3335 onClick = { ( ) => {
3436 if ( option . value === props . value ) {
3537 return
Original file line number Diff line number Diff line change @@ -984,6 +984,8 @@ const Blocks = props => {
984984 < div className = "s-settings-grid" >
985985 { DERIVED_BLOCKS [ id ] . map ( ( block , i ) => {
986986 const blockState = disabledBlocks [ block . name ] ?? BLOCK_STATE . ENABLED
987+ // Do not allow the disabling of column
988+ const disabledValues = block . name === 'stackable/columns' ? [ BLOCK_STATE . DISABLED ] : null
987989
988990 return (
989991 < AdminToolbarSetting
@@ -1010,6 +1012,7 @@ const Blocks = props => {
10101012 selectedColor : '#979e95' ,
10111013 } ,
10121014 ] }
1015+ disabledValues = { disabledValues }
10131016 onChange = { value => {
10141017 toggleBlock ( block . name , value )
10151018 } }
You can’t perform that action at this time.
0 commit comments