Replies: 3 comments 2 replies
-
The issue is that when you set the text property of a DIV it erases any child objects in the DIV, instead use the property (text-value x) and it will only change the "text" of the div and not that inner html of the div. In general text-value is always better as it handles the correct setting of text in forms, divs, etc |
Beta Was this translation helpful? Give feedback.
-
Just a follow up on the text vs text-value in this thread. Details:
What was the intent of the text vs text-value? Am I using it in a way that is in line with the design? |
Beta Was this translation helpful? Give feedback.
-
I use text all the time to clear out divs etc
…On Tue, Apr 16, 2024, 5:14 PM aykaramba ***@***.***> wrote:
Just a follow up on the text vs text-value in this thread. Details:
1.
I have a div referenced by a variable called "data" in a let* form. I
render tables and text to the "data" div.
2.
Now that I see the difference between (setf (text-value data)
"something") and (setf (text data) "something"), I have started to use
(setf (text data) " ") to "clear" out the child objects in the div (by
setting the content to a space effectively) and then rendering into the
"data" div tables.
What was the intent of the text vs text-value? Am I using it in a way that
is in line with the design?
—
Reply to this email directly, view it on GitHub
<#339 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACYUEFO7TZWCJR7CHOSISD3Y5WIC3AVCNFSM6AAAAABGCSDGVGVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TCMZVGI3DI>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I have a div labeled "data" and I am rendering data into it. Sometimes text, sometimes tables, sometimes other things. For example, if I create a let* and setf a bunch of text to the div, the div will end up rendering "ddd" with this on-click event:
And, if I just want to render a table to the data div, this works as well:
However, if I create a let* where I first do a bunch of setfs on the text property of the div and then try to create a table after the last "ddd" text is setf'd, the table doesn't render.
Why might this be? What is going here with respect to lexical scope that is preventing the table from being rendered? When I inspect the rendered document I only see the following:
I would maybe expect a
Any suggestions or tips here are helpful, this isn't an issue, I am just curious what is going on.
Beta Was this translation helpful? Give feedback.
All reactions