Merged in feature/IO-2297-datetime-improvement (pull request #798)
IO-2297 added optimistic response and click outside function Approved-by: Patrick Fic
This commit is contained in:
@@ -25,6 +25,7 @@ export default function ProductionListDate({
|
||||
// }
|
||||
|
||||
//e.stopPropagation();
|
||||
|
||||
updateAlert({
|
||||
variables: {
|
||||
jobId: record.id,
|
||||
@@ -32,6 +33,11 @@ export default function ProductionListDate({
|
||||
[field]: date,
|
||||
},
|
||||
},
|
||||
optimisticResponse: {
|
||||
update_jobs: {
|
||||
[field]: date,
|
||||
},
|
||||
},
|
||||
}).then(() => {
|
||||
if (record.refetch) record.refetch();
|
||||
if (!time) {
|
||||
@@ -49,9 +55,11 @@ export default function ProductionListDate({
|
||||
(moment().add(1, "day").isSame(moment(record[field]), "day") &&
|
||||
"production-completion-soon"));
|
||||
}
|
||||
|
||||
return (
|
||||
<Dropdown
|
||||
//trigger={["click"]}
|
||||
trigger={["click"]}
|
||||
onVisibleChange={(v) => setVisible(v)}
|
||||
visible={visible}
|
||||
style={{
|
||||
height: "19px",
|
||||
|
||||
Reference in New Issue
Block a user