createOptionAction() and returning new record id
Ive typically used createOptionUsing() with success, but in order to reuse some logic, I need to use createOptionAction() to perform the creation. Now its creating the record just fine, but its not returning an
id
so that the Select field is now selected with that option. I mean i understand why its not to an extent, but figured i would get a second set of eyes on how to overcome it.
4 Replies
looks like i can just use $set('name_of_select') to do it. Figured there was more an automatic way, but this works too
interesting though that when i do that, the afterStateUpdated on the Select doesnt appear to run like it does when i manually select something from it
@Dan Harrin is this a bug that createOptionAction doesn’t return the id like Using does?
no
createOptionAction is used to customize the action instance
short for modifyCreateOptionActionUsing()
I guess i more expected it to work like action() and using() on a CreateAction
yeah well no
using() is that