You need to sign in to do that
Don't have an account?
Nuevo9763
<input type="text" class="slds-input"
Hi All,
I am required to migrate an existing VF page to Ligthning experience, NOT lightning component. I am using <apex:SLDS/> for this as 'lightningStyleSheet' attribute is still in bets version my company does not want to use that yet.
Beause I am using <Aoex:SLDS/> ta I have to modify the styleing of certain UI componn\nets like ChecBox, InputText etc.I am trying to find a workaround for following.
Old code was:
Can anyone suggest workaround for JS call here?
I am required to migrate an existing VF page to Ligthning experience, NOT lightning component. I am using <apex:SLDS/> for this as 'lightningStyleSheet' attribute is still in bets version my company does not want to use that yet.
Beause I am using <Aoex:SLDS/> ta I have to modify the styleing of certain UI componn\nets like ChecBox, InputText etc.I am trying to find a workaround for following.
Old code was:
<apex:inputText id="searchText" value="{!searchTerm}" tabIndex="1" maxlength="255" onkeyup="enableSearchBtn()"/>Which is changed to:
<div class="slds-form-element__control"> <input type="text" class="slds-input" id="searchText" value="{!searchTerm}" onkeyup="enableSearchBtn()" /> </div>After this change the JS function enableSearchBtn() will not work as expected. Now I am trying to figure out a way to achieve the same results with or without js function. Lightning migration trail head suggests to use Quick Action, but I am not sure how can I use Quick Action in my scenario, as there is no standard record creation happening here. The JS function is merely used to check the user has entered 3 chars minimum and then the Search btn is enabled.
Can anyone suggest workaround for JS call here?
It is not very smart to avoid the 'lightningStyleSheet' attribute currently even it is a beta version because you will "suffer" for all the dynamic components.
The best way is to try the 'lightningStyleSheet' attribute and verify the results (becoming a beta-tester).
If you want to see how Salesforce uses SLDS for its own open-source projects with VFP, there is CUMULUS.
https://github.com/SalesforceFoundation/Cumulus/blob/master/src/components/UTIL_InputField.component
https://github.com/SalesforceFoundation/Cumulus/blob/master/src/components/UTIL_FormField.component
https://github.com/SalesforceFoundation/Cumulus/blob/master/src/pages/STG_PanelERR.page
https://github.com/SalesforceFoundation/Cumulus/tree/master/src/components
You need to "hack" if you want to translate all the components.
I managed to get good results with many "hacks" if my company would need the same translations of VFP for LEX as you are doing now but it is a much more dangerous way than the standard official tested option of Salesforce with lightningStyleSheet = true that we prefer now.
A quick question though , pardon me if it's too dumb, I am new to Ligthning.
Is it possible to develop the inputField itself as alightning component and use it in VFP?
Thanks,