- Changes required by ESLint.

Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
Dave Richer
2024-04-05 10:08:56 -04:00
parent c328a55453
commit 167d5bd89a
4 changed files with 22 additions and 17 deletions

View File

@@ -243,15 +243,15 @@ function TaskListComponent({
filteredInfo: {text: ""},
});
const handleCreateTask = () => {
setTaskUpsertContext({
actions: {},
context: {
jobid: parentJobId,
[relationshipType]: relationshipId,
},
});
};
const handleCreateTask = useCallback(() => {
setTaskUpsertContext({
actions: {},
context: {
jobid: parentJobId,
[relationshipType]: relationshipId,
},
});
}, [ parentJobId, relationshipId, relationshipType, setTaskUpsertContext]);
const handleTableChange = (pagination, filters, sorter) => {
setState({...state, filteredInfo: filters, sortedInfo: sorter});
@@ -261,14 +261,14 @@ function TaskListComponent({
history({search: queryString.stringify(search)});
};
const handleSwitchChange = (param, value) => {
const handleSwitchChange = useCallback((param, value) => {
if (value) {
search[param] = "true";
} else {
delete search[param];
}
history({search: queryString.stringify(search)});
};
}, [history, search]);
const expandableRow = (record) => {
return <Card title={t('tasks.fields.description')} size='small'>
@@ -315,7 +315,7 @@ function TaskListComponent({
</Button>
</Space>
);
}, [refetch, deleted, completed, mine]);
}, [refetch, deleted, completed, mine, onlyMine, t, handleSwitchChange, handleCreateTask]);
return (
<Card