Skip to content

Commit

Permalink
GH-173 - Assign modal fix
Browse files Browse the repository at this point in the history
  • Loading branch information
asaadmahmood committed Aug 22, 2022
1 parent 15a36fb commit f2f6dbc
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions webapp/src/components/assignee_modal/assignee_modal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ const AssigneeModal = (
icon={<CompassIcon icon='close'/>}
/>
<AutocompleteSelector
autoFocus={true}
id='send_to_user'
loadOptions={autocompleteUsers}
onSelected={changeAssigneeDropdown}
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/components/todo_issues/todo_issues.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function ToDoIssues(props) {
<Tada/>
<h3 style={style.completed.title}>{'All tasks completed'}</h3>
<p style={style.completed.subtitle}>
{'Nicely done, youve finished all of your tasks! Why not reward yourself with a little break?'}
{'Nicely done, you\'ve finished all of your tasks! Why not reward yourself with a little break?'}
</p>
</div>
);
Expand Down
2 changes: 2 additions & 0 deletions webapp/src/components/user_selector/autocomplete_selector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import './autocomplete_selector.scss';

type Props = {
loadOptions: (inputValue: string, callback: ((options: OptionsType<UserProfile>) => void)) => Promise<unknown> | void,
autoFocus?: boolean,
label?: string,
labelClassName?: string,
helpText?: string,
Expand Down Expand Up @@ -123,6 +124,7 @@ export default function AutocompleteSelector(props: Props) {
{labelContent}
<div className={inputClassName}>
<AsyncSelect
autoFocus={props.autoFocus || false}
cacheOptions={true}
loadOptions={loadOptions}
defaultOptions={true}
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/widget/buttons/button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
align-items: center;
text-align: center;
justify-content: center;
border-radius: var(--default-rad);
border-radius: 4px;
min-width: 20px;
cursor: pointer;
overflow: hidden;
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/widget/menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
z-index: 15;
background-color: rgba(var(--center-channel-bg-rgb), 1);
color: rgba(var(--center-channel-color-rgb), 1);
border-radius: var(--default-rad);
border-radius: 4px;
box-shadow: var(--elevation-4);

.menu-contents {
Expand Down
5 changes: 3 additions & 2 deletions webapp/src/widget/menuItem.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, {useState, useEffect} from 'react';
import React, {useEffect} from 'react';
import PropTypes from 'prop-types';

import CompassIcon from '../components/icons/compassIcons';
Expand All @@ -20,8 +20,9 @@ const MenuItem = (props: Props) => {
const {icon, shortcut, action, text} = props;

useEffect(() => {
function handleKeypress(e: {key: string}) {
function handleKeypress(e: any) {
if (e.key === shortcut) {
e.target.dispatchEvent(new Event('menuItemClicked'));
action();
}
}
Expand Down

0 comments on commit f2f6dbc

Please sign in to comment.