Does anyone have any idea why renderAjax breaks my CSS? Everytime I do a renderAjax my buttons change colors to default even though I have the .css file in AppAssets.php. I have switched back to renderPartial and its all good now but widgets are not initialized. Any pointers for a noobie like me would be helpful.
My AppAsset file is super clean… I use main.php for my layout file and everything else is rendered via renderPartial and renderAjax. When I use renderAjax for some reason it does not appear to use the css from my main.php file. I’ve got no idea why except to think its a renderAjax bug.
Your AppAsset is registered to the layout view (main.php), and is not registered to the partial view that you are rendering using renderAjax. Am I right? Then the css files in AppAsset will not be sent to the user’s browser. Try including the necessary css files in the asset you are registering to the partial view for renderAjax.