diff --git a/frontend/src/components/dropdown.js b/frontend/src/components/dropdown.js index f512d6a12e..ebffd038f5 100644 --- a/frontend/src/components/dropdown.js +++ b/frontend/src/components/dropdown.js @@ -27,7 +27,7 @@ class DropdownContent extends React.PureComponent { for (let x = 0; x < value.length; x++) { if (value[x].label === label) { isRemove = true; - this.props.onRemove(ourObj); + this.props.onRemove && this.props.onRemove(ourObj); this.props.onChange(value.slice(0, x).concat(value.slice(x + 1))); } } @@ -38,7 +38,7 @@ class DropdownContent extends React.PureComponent { newArray = []; } newArray.push(ourObj); - this.props.onAdd(ourObj); + this.props.onAdd && this.props.onAdd(ourObj); this.props.onChange(newArray); } } diff --git a/frontend/src/components/header/index.js b/frontend/src/components/header/index.js index 12ec2384aa..e71e1f29de 100644 --- a/frontend/src/components/header/index.js +++ b/frontend/src/components/header/index.js @@ -198,8 +198,6 @@ class Header extends React.Component { <> {}} - onRemove={() => {}} onChange={this.onUserMenuSelect} value={[]} display={} diff --git a/frontend/src/components/localeSelect.js b/frontend/src/components/localeSelect.js index a2d5bb367f..0c4f4d28b7 100644 --- a/frontend/src/components/localeSelect.js +++ b/frontend/src/components/localeSelect.js @@ -23,8 +23,6 @@ function LocaleSelect({ userPreferences, setLocale, className }) { }; return ( {}} - onRemove={() => {}} onChange={onLocaleSelect} value={getActiveLanguageNames()} options={supportedLocales} diff --git a/frontend/src/components/notifications/notificationOrderBy.js b/frontend/src/components/notifications/notificationOrderBy.js index b3a8e189a5..5b4aa5891e 100644 --- a/frontend/src/components/notifications/notificationOrderBy.js +++ b/frontend/src/components/notifications/notificationOrderBy.js @@ -37,7 +37,7 @@ export function NotificationOrderBySelector(props) { sort: 'ASC', }, ]; - const onSortSelect = arr => { + const onSortSelect = (arr) => { if (arr.length === 1) { props.setQuery( { @@ -54,8 +54,6 @@ export function NotificationOrderBySelector(props) { }; return ( {}} - onRemove={() => {}} onChange={onSortSelect} value={`${props.allQueryParams.orderBy}.${props.allQueryParams.orderByType}` || []} options={options} diff --git a/frontend/src/components/projects/orderBy.js b/frontend/src/components/projects/orderBy.js index 89fdd946b3..2ac6d71409 100644 --- a/frontend/src/components/projects/orderBy.js +++ b/frontend/src/components/projects/orderBy.js @@ -62,8 +62,6 @@ export function OrderBySelector(props) { }; return ( {}} - onRemove={() => {}} onChange={onSortSelect} value={`${props.allQueryParams.orderBy}.${props.allQueryParams.orderByType}` || []} options={options} diff --git a/frontend/src/components/projects/projectNav.js b/frontend/src/components/projects/projectNav.js index 4eb61da7d5..9d1eff29ab 100644 --- a/frontend/src/components/projects/projectNav.js +++ b/frontend/src/components/projects/projectNav.js @@ -52,8 +52,6 @@ export const ProjetListViewToggle = (props) => { const DifficultyDropdown = (props) => { return ( {}} - onRemove={() => {}} onChange={(n) => { const value = n && n[0] && n[0].value; props.setQuery( diff --git a/frontend/src/components/projects/projectsActionFilter.js b/frontend/src/components/projects/projectsActionFilter.js index a31764b64a..8665553120 100644 --- a/frontend/src/components/projects/projectsActionFilter.js +++ b/frontend/src/components/projects/projectsActionFilter.js @@ -23,8 +23,6 @@ export const ProjectsActionFilter = ({ setQuery, fullProjectsQuery }) => { return ( {}} - onRemove={() => {}} onChange={(n) => { const value = n && n[0] && n[0].value; // clean the action query param if it was set on the URL, diff --git a/frontend/src/components/taskSelection/actionSidebars.js b/frontend/src/components/taskSelection/actionSidebars.js index bacf6563e7..2c53746da3 100644 --- a/frontend/src/components/taskSelection/actionSidebars.js +++ b/frontend/src/components/taskSelection/actionSidebars.js @@ -582,8 +582,6 @@ export function ReopenEditor({ project, action, editor, callEditor }: Object) { display={} className="bg-white b--grey-light ba pa2 di" onChange={callEditor} - onAdd={() => {}} - onRemove={() => {}} toTop={true} /> diff --git a/frontend/src/components/taskSelection/footer.js b/frontend/src/components/taskSelection/footer.js index 12866d12d2..18cb0fce99 100644 --- a/frontend/src/components/taskSelection/footer.js +++ b/frontend/src/components/taskSelection/footer.js @@ -204,8 +204,6 @@ const TaskSelectionFooter = ({ defaultUserEditor, project, tasks, taskAction, se className="bg-white bn" toTop={true} onChange={updateEditor} - onAdd={() => {}} - onRemove={() => {}} />
diff --git a/frontend/src/components/taskSelection/taskActivity.js b/frontend/src/components/taskSelection/taskActivity.js index bf3b0bfb68..902aa89a63 100644 --- a/frontend/src/components/taskSelection/taskActivity.js +++ b/frontend/src/components/taskSelection/taskActivity.js @@ -238,9 +238,6 @@ export const TaskDataDropdown = ({ history, changesetComment, bbox }: Object) => if (history && history.taskHistory && history.taskHistory.length > 0) { return ( {}} - onRemove={() => {}} - onChange={() => {}} value={null} options={[ { label: , href: osmchaLink }, @@ -396,8 +393,6 @@ function EditorDropdown({ project, taskId, bbox }: Object) { display={} className="bg-white b--grey-light ba pa2 dib v-mid" onChange={loadTaskOnEditor} - onAdd={() => {}} - onRemove={() => {}} /> ); } diff --git a/frontend/src/components/taskSelection/taskList.js b/frontend/src/components/taskSelection/taskList.js index c822114d7a..088441bfd4 100644 --- a/frontend/src/components/taskSelection/taskList.js +++ b/frontend/src/components/taskSelection/taskList.js @@ -287,8 +287,6 @@ export function TaskList({
{}} - onRemove={() => {}} onChange={updateSortingOption} value={sortBy || 'date'} options={sortingOptions} diff --git a/frontend/src/components/user/forms/settings.js b/frontend/src/components/user/forms/settings.js index 4f05465e68..8b32d13ecc 100644 --- a/frontend/src/components/user/forms/settings.js +++ b/frontend/src/components/user/forms/settings.js @@ -40,8 +40,6 @@ function _EditorDropdown(props) { return ( {}} - onRemove={() => {}} onChange={onEditorSelect} value={value} options={getEditors()} diff --git a/frontend/src/components/user/list.js b/frontend/src/components/user/list.js index d64f60422e..1f6cddc965 100644 --- a/frontend/src/components/user/list.js +++ b/frontend/src/components/user/list.js @@ -72,8 +72,6 @@ const RoleFilter = ({ filters, setFilters, updateFilters }) => { return (
{}} - onRemove={() => {}} onChange={(n) => { const value = n && n[0] && n[0].value; updateFilters('role', value); @@ -96,8 +94,6 @@ const MapperLevelFilter = ({ filters, setFilters, updateFilters }) => { return (
{}} - onRemove={() => {}} onChange={(n) => { const value = n && n[0] && n[0].value; updateFilters('level', value); diff --git a/frontend/src/views/projectEdit.js b/frontend/src/views/projectEdit.js index f028f86c40..ae39669b73 100644 --- a/frontend/src/views/projectEdit.js +++ b/frontend/src/views/projectEdit.js @@ -253,8 +253,6 @@ export default function ProjectEdit({ id }) {
{}} - onRemove={() => {}} value={null} options={[ {