Skip to content

Commit 1089b9a

Browse files
committed
💄 Make "All" checkbox indeterminate
Closes #30
1 parent f9ac71d commit 1089b9a

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

readme.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ You can report security bugs through the Patchstack Vulnerability Disclosure Pro
7575
== Changelog ==
7676

7777
= 1.4.1 =
78+
* We added an indeterminate visual display of the "All" checkbox, e.g. while selecting posts.
7879
* We fixed displaying post type visibility settings inside the site editor.
7980

8081
= 1.4.0 =

src/control/controls.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,19 @@ const addControls = createHigherOrderComponent( ( BlockEdit ) => {
632632
]
633633
: false
634634
}
635+
indeterminate={
636+
hidePosts &&
637+
hidePosts[ type ] &&
638+
! hidePosts[ type ][
639+
'all'
640+
] &&
641+
Object.values(
642+
hidePosts[ type ]
643+
).some(
644+
( item ) =>
645+
item === true
646+
)
647+
}
635648
value="all"
636649
onChange={ ( value ) =>
637650
onChangePostsAll(

0 commit comments

Comments
 (0)