On a smart action get the load hook to kick in on load. It’s not happening. Not setting value, nor printing log, nor stopping at break point.
Actual behavior
It’s not being fired so it is as it’s not being defined.
Failure Logs
no failure log when opening smart action on UI. It’s showing the action. It’s loading it but the fields of enum are still empty so no option showing on dropdown.
Hello @rofi, and welcome to the Forest Admin community
Load hook only works with single smart action. The bulk type is not supported yet.
You can read the documentation to find more information about this feature
Hey @Guillaume_Cisco . Yes, it answers my question thanks. But I got you another one Is there a workaround or other approach to pickup async data for bulk actions? Seems like a normal use case.
Indeed, values will also work with single smart actions.
As a workaround, you could use defaultValue for each field. It won’t be dynamic, but will allow you to declare basic default values for your fields.
I think the answer is that ForestAdmin lacks full bulk editing capabilities. Not seeing a workaround here. Thanks anyway @Guillaume_Cisco for the help.
Great @jeffladiray . I don’t know the constraint on not letting the hook be called on bulk. Surely there is a why. In my case, I want to on load set an enum with an async query for a database collection. Putting it here just to see if you think there is another way to do this. To close all options. But that functionality seems to be off-limits without the hook.