I am trying to create the most user friendly experience in an LWC.
I have seen the documentation for how to generate a picklist from apex like so:
(https://developer.salesforce.com/docs/component-library/documentation/lwc/lwc.reference_configuration_tags) (https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/components_config_for_app_builder_dynamic_picklists.htm)
This creates Dynamic picklists, but how would I go about creating REACTIVE picklist inputs?
For example, in Salesforce's own 'Related List - Single' flexipage component, If the user selects an option from the 'Parent Record' picklist, the system uses the chosen value to generate the correct values for the 'Related List' picklist.
I have a few ideas on how to accomplish this but need a push in the right direction:
can you pass parameters into your datasource apex method? something like datasource="{!'apex://MyCustomPickList'+methodArguement}"
can you use if statements to control which apex method is being used? something like datasource="{! IF(myBoolean, 'apex://MyCustomPickList', 'apex://MyOtherCustomPickList') }"
I saw this buried in the documentation, but not sure if this is what I need or how to use it: "You can use VisualEditor.DesignTimePageContext to give your picklist the context of the page that the component resides on."
Any direction you could give would be much appreciated.