add selected to description of current presentation in actions dropdown
This commit is contained in:
parent
9bf832ca42
commit
c37262e2af
@ -261,6 +261,7 @@ class ActionsDropdown extends PureComponent {
|
||||
customStyles: p.current ? customStyles : null,
|
||||
icon: "file",
|
||||
iconRight: p.current ? 'check' : null,
|
||||
selected: p.current ? true : false,
|
||||
label: p.name,
|
||||
description: "uploaded presentation file",
|
||||
key: `uploaded-presentation-${p.id}`,
|
||||
|
@ -64,8 +64,7 @@ class BBBMenu extends React.Component {
|
||||
const { actions, selectedEmoji } = this.props;
|
||||
|
||||
return actions?.map(a => {
|
||||
const { dataTest, label, onClick, key, disabled, description } = a;
|
||||
|
||||
const { dataTest, label, onClick, key, disabled, description, selected } = a;
|
||||
const emojiSelected = key?.toLowerCase()?.includes(selectedEmoji?.toLowerCase());
|
||||
|
||||
let customStyles = {
|
||||
@ -101,7 +100,7 @@ class BBBMenu extends React.Component {
|
||||
<Styled.MenuItemWrapper>
|
||||
{a.icon ? <Icon iconName={a.icon} key="icon" /> : null}
|
||||
<Styled.Option aria-describedby={`${key}-option-desc`}>{label}</Styled.Option>
|
||||
{description && <div className="sr-only" id={`${key}-option-desc`}>{description}</div>}
|
||||
{description && <div className="sr-only" id={`${key}-option-desc`}>{`${description}${selected ? ' - selected' : ''}`}</div>}
|
||||
{a.iconRight ? <Styled.IconRight iconName={a.iconRight} key="iconRight" /> : null}
|
||||
</Styled.MenuItemWrapper>
|
||||
</Styled.BBBMenuItem>,
|
||||
|
Loading…
Reference in New Issue
Block a user