HTML In V-Slot Not Rendering As HTML
-
@tof06 @s-molinari
I tried that. Unfortunately, that gets me:Errors compiling template:
href=“mailto:{{props.row.landline}}”: Interpolation inside attributes has been removed. Use v-bind or the colon shorthand instead. For example, instead of <div id="{{ val }}">, use <div :id=“val”>.
-
Like I said, probably need a computed property to build the href. You can do computed properties and add HTML.
If you put together a codesandbox or codepen, I’ll show you what I mean.
Scott
-
@s-molinari
I’d never set up a codepen before, so it took me a few tries. Here it is:
https://codepen.io/vahost/pen/GRJLRaW?editors=1111 -
Oh. I completely overlooked you are using grid-mode. Those slots won’t work in grid mode and this will now only work in grid mode. Hope it helps.
https://codepen.io/smolinari/pen/bGdJBqX?editors=1010
Scott
-
@s-molinari Tell me more about that. Why won’t slots work in grid mode?
Thanks for the pen, by the way! I’ll study it next.
-
Because in grid mode, those slots simply aren’t used. They are for the normal table mode only. So, if you want the formatting to happen in normal mode too, you’d need all of the slots set up for the output.
Scott
-
@s-molinari Are you saying that there are other slots that ARE used in grid mode, or are you saying that no slots are ever used in grid mode? I’m still trying to understand what you’re saying.
-
In normal (non-grid) mode, all the cell, body, etc. slots are put to use, if you use them. If you switch to grid mode, they are ignored. The only slot used in grid mode is the item slot.
I hope that makes it clearer.
Scott
-
@s-molinari Ah! Yes, that helps a lot. Thanks again!
-
@s-molinari I have a problem with your pen that I can’t resolve.
For the first and last names, the only way the search will find them is if I start with the first letter of the first name.
So typing the first letters of the last name fails to find the correct rows.
But with the other fields, I can enter any few letters, even in the middle of a word, and it will keep the rows that contain that substring regardless of whether the substring starts at the beginning of the value.
How can I change this?
-
Updated.
https://codepen.io/smolinari/pen/bGdJBqX?editors=1010
You should show what you attempted in your own pen (could be a fork of mine). Maybe I could have just answered with a reply to lead you in the right direction.
Scott
-
@s-molinari Will do going forward. Thanks!