artur
November 21, 2022, 9:21pm
1
Currently list details blocks show dashes (-) when the expected content is empty. As a quick solution this code below will fix it until the team is doing proper fix.
<script>
window.addEventListener('get-record-list-details2', (e) => {
function getElementsByText(str, tag = 'p') {
return Array.prototype.slice.call(document.getElementsByTagName(tag)).filter(el => el.textContent.trim() === str.trim());
}
setTimeout(() => {
const emptyElements = getElementsByText('-');
emptyElements.forEach(element => element.closest("div.label-wrapper").style.display = 'none');
}, 100);
});
</script>
Note: list-details2
is the id of the block which can be found in the block settings panel.
6 Likes
ChezS
November 29, 2022, 5:37am
2
Hi @artur ,
This works for text - but not video. IA grey square remains, like this:
Is there a fix for video too?
Suzie
December 1, 2022, 12:43pm
3
Hey @ChezS ,
We are having some discussions about this issue, I’ll keep you posted once having an update on this.
Will need to come up with a better solution, surely.
1 Like
Hi @ChezS - I use this custom code on the page and it removed the video placeholder.
img.video-placeholder.sw-width-full.sw-border-style-none.sw-border-width-xs.sw-border-color-000000
{
display: none !important;
}
img.video-placeholder.sw-width-l.sw-border-style-none.sw-border-width-xs.sw-border-color-000000
{
display: none !important;
}
Hi, this did not work. I used the same custom code. Is it still applicable code that works in the Softr environment?
Below is my custom code -
@artur