Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data Flows: cannot edit an operation #13702

Closed
mslonina opened this issue Jun 3, 2022 · 9 comments · Fixed by #13713
Closed

Data Flows: cannot edit an operation #13702

mslonina opened this issue Jun 3, 2022 · 9 comments · Fixed by #13713
Assignees
Labels
Milestone

Comments

@mslonina
Copy link

mslonina commented Jun 3, 2022

Describe the Bug

Hi,

first of all - long awaited feature with DataFlows - awesome!

But, once the flow is created, and an operation is added, it looks like, we cannot edit the operation, but we can replace it entirely i.e. Log in to console cannot be updated, after clicking Edit icon, the dialog with list of operations appears.

To Reproduce

  1. Create a flow
  2. Add a operation - Log in to console and save it
  3. Try to edit Log in to console operation - the list of operations appears, not the operation itself

Errors Shown

None

What version of Directus are you using?

9.12.0

What version of Node.js are you using?

Docker

What database are you using?

Docker

What browser are you using?

Safari

How are you deploying Directus?

Docker

@vanling
Copy link
Contributor

vanling commented Jun 3, 2022

Workaround would be to refresh when you are in editing screen.

rec.mov

@rijkvanzanten rijkvanzanten self-assigned this Jun 3, 2022
@rijkvanzanten rijkvanzanten added this to the v9-next milestone Jun 3, 2022
@rijkvanzanten
Copy link
Member

I'm not able to reproduce this locally under the dev build, lemme try a prod instance

@rijkvanzanten
Copy link
Member

Can confirm. This only happens in the prod build 🤦🏻

@rijkvanzanten
Copy link
Member

rijkvanzanten commented Jun 3, 2022

oh. and it only happens in prod Safari 🙈

@vanling
Copy link
Contributor

vanling commented Jun 3, 2022

I got in edge :) Versie 101.0.1210.53 (Officiële build) (arm64)

@rijkvanzanten
Copy link
Member

Ah yeah I edited the trigger, not the operation 👍🏻

@vanling
Copy link
Contributor

vanling commented Jun 3, 2022

Maybe timing thing between route/url update and opening the dialog/drawer. Dev build slower?

@rijkvanzanten
Copy link
Member

I think these refs aren't correctly starting on the values of the prop due to some timing issue. The drawer should only be rendered if the prop exists, but for some reason there's a small discrepancy in timing between prod and dev of when the prop exists (I think)

const options = ref<Record<string, any>>(props.operation?.options ?? {});
const operationType = ref<string | undefined>(props.operation?.type);
const operationKey = ref<string | null>(props.operation?.key ?? null);
const operationName = ref<string | null>(props.operation?.name ?? null);

rijkvanzanten added a commit that referenced this issue Jun 3, 2022
* Use immediate watcher instead of prop based ref default val

Fixes #13702

* Make it happy

* I'll be damned, it wasn't my stupidity after all
@mslonina
Copy link
Author

mslonina commented Jun 4, 2022

Thanks! I can confirm it works now!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants