directus-extension-computed-interface icon indicating copy to clipboard operation
directus-extension-computed-interface copied to clipboard

How to overwrite computed value?

Open stx-chris opened this issue 1 year ago • 3 comments

Great extension! I would like to use it to suggest a date one year in the future, given a certain start date. I succeeded in formulating the template, but when I want to overwrite the computed value, it re-computes (and therefore resets) its value on each keystroke.

field: my_date (format: DD.MM.YYYY) computed field: future_date template: {{ CONCAT(LEFT(my_date,6),SUM(INT(RIGHT(my_date,4)),1)) }}

e.g. my_date: 14.03.2023 future_date: 14.03.2024 (computed) want to overwrite with 15.12.2024

but when I overwrite the computed field, it won't work. Neither does copy & paste. Is there a workaround by any chance?

stx-chris avatar Oct 24 '23 14:10 stx-chris

@stx-chris I have created a pull request that should solve this problem. Feel free to use this package as a temporary replacement until the PR is accepted https://www.npmjs.com/package/@yakubovmax213/directus-extension-computed-interface

yakubovmax213 avatar Jan 29 '24 17:01 yakubovmax213

thx @yakubovmax213 for your reply! Will try

stx-chris avatar Jan 30 '24 11:01 stx-chris

is there an update on this issue? i'd be great to be able to overwrite the values once computed

bogdan-nita avatar Mar 19 '24 11:03 bogdan-nita