You need to sign in to do that
Don't have an account?
Srinivas223
Mobile Layout in lightning is not flexible
My lightning component with list of opportunites is working perfect on the desktop. It is having too many columns and when opened in Mobile it is like in the below screenshot.
it is displaying first three fields on the mobile but not all. If i try to navigate to the right side it is not scrolling with my touch screen. In the second screenshot I have up and down arrows above the key pad. If i click on those arrows I can move to other fileds that are not visible on the screen. But, my requirement is to just scroll side ways as well to see the other fields instead of using arrows. Is there anyway to get this functioality?
I appreciate your help.
it is displaying first three fields on the mobile but not all. If i try to navigate to the right side it is not scrolling with my touch screen. In the second screenshot I have up and down arrows above the key pad. If i click on those arrows I can move to other fileds that are not visible on the screen. But, my requirement is to just scroll side ways as well to see the other fields instead of using arrows. Is there anyway to get this functioality?
I appreciate your help.
I trust you are doing splendidly and enjoying the season!
I suggest you to use ui:scrollerWrapper that enables native scrolling of Lightning Components in Salesforce app as well as in Lightning Desktop.
Below is the sample code which I have tested in my org and it is working fine in mobile also. You can modify the code as per your requirement.
Application:
Component:
Controller:
Helper:
CSS:
Server Controller:
* I have used <ui:scrollerWrapper class="slds-scrollable_y"> to get the horizontal scrolling. *
I hope it helps you.
Kindly let me inform if it helps you and close your query by marking it as solved so that it can help others in future.
Thanks and Regards,
Khan Anas
All Answers
I trust you are doing splendidly and enjoying the season!
I suggest you to use ui:scrollerWrapper that enables native scrolling of Lightning Components in Salesforce app as well as in Lightning Desktop.
Below is the sample code which I have tested in my org and it is working fine in mobile also. You can modify the code as per your requirement.
Application:
Component:
Controller:
Helper:
CSS:
Server Controller:
* I have used <ui:scrollerWrapper class="slds-scrollable_y"> to get the horizontal scrolling. *
I hope it helps you.
Kindly let me inform if it helps you and close your query by marking it as solved so that it can help others in future.
Thanks and Regards,
Khan Anas
ScrollerWrapper working fine now on the mobile. I used it wrongly before. Thank you for your help.
But, after using ScrollerWrapper, I checked it on Desktop, it is not touch screen and i could not scroll side ways. Before I use scroller, my desktop is having an option to move sideways. But now i dont see it to move sideways.
Once again thank you for your time and effort.