• Yoann Boutin 2
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 2
    Replies
Hi,

So i'm currently using a lightning-datatable in my LWC and it seems that there is some configuration not working in some cases.
I would like to always have my all my rows with the option "wrapText" selected by default for some columns, so for that i saw that you can put "wrapText: true" in the column config, fine.
Then you need to define "wrap-text-max-lines" on your lightning-datatable component, which i did and set to 3.

So if i just use this configuration everything is fine, but as i always want to have it wrapped i want to remove the default column actions (the one where you select clip or wrap text) and for that you need to have another property to your column config, which is "hideDefaultActions: true" and then it is perfect you don't have anymore the default action on top of your column ...

... BUT, once you put this "hideDefaultActions" to your colonne config, the wrapText one is not working anymore and you column values are fixed to "clip text" which is the default value of the default actions...

This is the problem, i guess it is an issue on the lightning-datatable to not be able to combine those 2 configuration, i know that the hideDefaultActions and wrapText are pretty new properties, so am i doing something wrong or is there a real issue on SF side ?

Don't hesitate if i missed something or if you need more information

Regards,
Yoann BOUTIN
Hi,

So as i said in the title, my need is to integrate an Angular component into Salesforce, so i successfully did it by importing my built component into Salesforce as a static resource and then using it in a lightning container in a Lightning Component.

What i need now is to be able to communicate from the Lightning Component to the Angular app to share some data. So i added to my Angular app the NPM package: LCC

I know that i need to use the addMessageHandler in my Angular app to be able to receive messages sent from my Lightning Component, but i don't know if i'm doing it correctly because i'm receiving correctly the message in the Angular app, but then if i want to update a variable in the Angular app using the values received in the message it seems that it is not.
For example, in the Angular app html i'm displaying a variable in a text field, if i send a message from the Lightning Component to be able to update this content it seems that i'm receiving the value but when i assign this new value to my variable in the angular app (this.value = message.value) my DOM is not updated, meaning it will not display the new value received, do i miss something ?

I found several example with React but i did not found any concrete example on how and where to define the addMessageHandler in an Angular app, so i wanted to know if you could help me with that, if you have any example to share or any documentation more focused on Angular.

Don't hesitate to ask me if you need anything else to help me.

Best regards
Hi !
So, from what i found until now it seems pretty impossible to integrate some components developped in Angular (not angularJS) into LWC due to LockerService.
Is there any solution to be able to re-use some code done using Angular (component, app, web component, library, ...) in LWC ?

I know that LWC are the best practice usage right now when developping new things in sales force, that's why i wanted to see if it is possible to do that.

In my company we have currently differently web application running and we wanted to investigate to see if it could be possible to avoid to re-code our components and use them in sales force (even if it request few changes)

What is the best way to achieve this kind of problematic ?

Best Regards,

Yoann BOUTIN
Hi,

So i'm currently using a lightning-datatable in my LWC and it seems that there is some configuration not working in some cases.
I would like to always have my all my rows with the option "wrapText" selected by default for some columns, so for that i saw that you can put "wrapText: true" in the column config, fine.
Then you need to define "wrap-text-max-lines" on your lightning-datatable component, which i did and set to 3.

So if i just use this configuration everything is fine, but as i always want to have it wrapped i want to remove the default column actions (the one where you select clip or wrap text) and for that you need to have another property to your column config, which is "hideDefaultActions: true" and then it is perfect you don't have anymore the default action on top of your column ...

... BUT, once you put this "hideDefaultActions" to your colonne config, the wrapText one is not working anymore and you column values are fixed to "clip text" which is the default value of the default actions...

This is the problem, i guess it is an issue on the lightning-datatable to not be able to combine those 2 configuration, i know that the hideDefaultActions and wrapText are pretty new properties, so am i doing something wrong or is there a real issue on SF side ?

Don't hesitate if i missed something or if you need more information

Regards,
Yoann BOUTIN
Hi,

So as i said in the title, my need is to integrate an Angular component into Salesforce, so i successfully did it by importing my built component into Salesforce as a static resource and then using it in a lightning container in a Lightning Component.

What i need now is to be able to communicate from the Lightning Component to the Angular app to share some data. So i added to my Angular app the NPM package: LCC

I know that i need to use the addMessageHandler in my Angular app to be able to receive messages sent from my Lightning Component, but i don't know if i'm doing it correctly because i'm receiving correctly the message in the Angular app, but then if i want to update a variable in the Angular app using the values received in the message it seems that it is not.
For example, in the Angular app html i'm displaying a variable in a text field, if i send a message from the Lightning Component to be able to update this content it seems that i'm receiving the value but when i assign this new value to my variable in the angular app (this.value = message.value) my DOM is not updated, meaning it will not display the new value received, do i miss something ?

I found several example with React but i did not found any concrete example on how and where to define the addMessageHandler in an Angular app, so i wanted to know if you could help me with that, if you have any example to share or any documentation more focused on Angular.

Don't hesitate to ask me if you need anything else to help me.

Best regards
Hi !
So, from what i found until now it seems pretty impossible to integrate some components developped in Angular (not angularJS) into LWC due to LockerService.
Is there any solution to be able to re-use some code done using Angular (component, app, web component, library, ...) in LWC ?

I know that LWC are the best practice usage right now when developping new things in sales force, that's why i wanted to see if it is possible to do that.

In my company we have currently differently web application running and we wanted to investigate to see if it could be possible to avoid to re-code our components and use them in sales force (even if it request few changes)

What is the best way to achieve this kind of problematic ?

Best Regards,

Yoann BOUTIN