Skip to content

Commit

Permalink
Fix block multiple select height, and show more users.
Browse files Browse the repository at this point in the history
  • Loading branch information
polevaultweb committed Dec 15, 2020
1 parent fd0cf78 commit fbc225c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/extensions/restriction-settings/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const restrictStateOptions = [
];

const options = [];
wp.apiFetch({ path: "/wp/v2/users" }).then(posts =>
wp.apiFetch({ path: "/wp/v2/users?per_page=100" }).then(posts =>
posts.map(function(user) {
options.push({ value: user.id, label: user.name });
})
Expand Down Expand Up @@ -171,6 +171,7 @@ const withRestrictionControls = createHigherOrderComponent(BlockEdit => {
"Display only to these users"
)}
multiple
className='wpum-multiple-select'
value={wpum_restrict_users}
options={options}
onChange={selectedUsers => {
Expand All @@ -187,6 +188,7 @@ const withRestrictionControls = createHigherOrderComponent(BlockEdit => {
"Display only to users with these roles"
)}
multiple
className='wpum-multiple-select'
value={wpum_restrict_roles}
options={roleOptions}
onChange={selectedRoles => {
Expand Down
6 changes: 6 additions & 0 deletions src/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
}
}

.wpum-multiple-select {
select {
height: 100px !important;
}
}

.wpum-panel-setting {
p {
margin: 10px 0;
Expand Down

0 comments on commit fbc225c

Please sign in to comment.