Skip to content

Commit

Permalink
fix: Auto expand blocktype filter menu to fit
Browse files Browse the repository at this point in the history
  • Loading branch information
yusuf-musleh committed May 6, 2024
1 parent de408b5 commit 8ac2d6c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/search-modal/FilterByBlockType.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const FilterByBlockType = () => {
name="block-type-filter"
defaultValue={blockTypesFilter}
>
<Menu style={{ boxShadow: 'none' }}>
<Menu className="block-type-refinement-menu" style={{ boxShadow: 'none' }}>
{
Object.entries(blockTypes).map(([blockType, count]) => (
<MenuItem
Expand Down
8 changes: 8 additions & 0 deletions src/search-modal/SearchModal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@
}
}

// Options for the "filter by block type" menu
.pgn__menu.block-type-refinement-menu {
.pgn__menu-item {
// Make the "filter by block type" menu expand to fit longer block types names
width: 100%;
}
}

.pgn__menu-item {
// Fix a bug in Paragon menu dropdowns: the checkbox currently shrinks if the text is too long.
// https://github.com/openedx/paragon/pull/3019
Expand Down

0 comments on commit 8ac2d6c

Please sign in to comment.