Closed omeragictarik closed 3 years ago
Yes, changing the color of the placeholder is totally possible. What you have to do is style the element with the class .ktd-grid-item-placeholder
. Take in account that this placeholder item is created inside the ktd-grid
and therefore you have no direct access to it, so you have 3 options:
1- Use ::ng-deep
.
2- Use ViewEncapsulation.None
in the component that uses the grid.
3- Put the styles in your main.scss
or some global .scss file, it would make sense If that placeholder color is for all your grids.
Here is an example using 'ng-deep': (note that the color of the placeholder is orange now) https://stackblitz.com/edit/angular-grid-layout-placeholder-color?file=src/app/playground/playground.component.scss
1- The class .ktd-grid-item-placeholder
is not mean to be changed in any way, so is safe to use it. In case of change, I would consider it a major API change and would end up on a new major version.
2- In the future the placeholder would be able to be replaced for ANY element provided by the consumers of the lib. This is a TODO feature that I hope could be done in the near future. If anyone is coming here interested on changing some parts of the placeholder, and styles are not enough, you can DM me and start planning the placeholder replacement and also take part of it.
Thank you very much!
You are welcome:), I am closing the issue.
Is there a possibility to change the red background which shows while moving the boxes?