Here is a list of new and changed Lightning Components for Winter 18. I am really excited about the dueling picklist, the native slider (hopefully it is mobile friendly) and the added notifications library!
For a project I am currently working on I wanted to implement a dynamic input field that set it’s body based on the user’s selection of the type of query they are making. There are 6 possible fields the user can query on and these 6 fields can be mapped to 3 types of queries — Date Picker, Date Rage and Input Text. Using what I have learned in dev 601 with Mike Topalovich (kudos again to Mike), I have been actively pairing down and generic-izing (?) every component I build. So this solution needed to be both generic to the given situation and also flexible enough to accommodate the variety of options needed. I ended up creating a simple component to hold the dynamic input field which has optional parameters of “name” and “dynamicSetting”. I wasn’t able to pass the change value to the dynamicSetting on the created component so I have an attribute in the parent that controls the colored label showing the value of the date slider. This is also the value that would be passed to the APEX controller to execute the query.
We recently went live with a team on Lightning only. Everything seemed to be going okay until the New Quote button disappeared suddenly from the quote related list on Opportunity on SF1. The button was there in LEX (Lightning Experience) but on mobile devices it was gone, just gone. And the worst part was it had been there the week before. I got on the SFDC help desk red phone and once I had my case elevated to tier 2, I had a very helpful rep research the issue for me. Come to find out SFDC R&D had removed the button from SF1 without notice because of some bugs they were seeing.
Well, not to be one to give up that easily I created a workaround. I was told the only workaround would be to create a Visualforce page which seemed really heavy handed, especially if SFDC is going to fix the issue sometime in the future.
Note, this workaround is designed for Lightning and SF1. If you are using classic then you would be better off going the route of a Visualforce page. Our users are going live on Lightning and are heavy mobile users so this functionality is critical for them. Enough talking and let’s get to the code…
This is a Lightning Component Action which means that once you have created the component you will need to create a Lightning Action that will use the code add the action to your page layout. Click into the links below to see the code in my GitHub repo. Note that you will need to wire up your own field validation (I have not added that as of yet). Happy coding!