Skip to content
This repository has been archived by the owner on Apr 25, 2018. It is now read-only.

Node attr: colSpan is now colspan #93

Open
jadbox opened this issue May 3, 2016 · 6 comments
Open

Node attr: colSpan is now colspan #93

jadbox opened this issue May 3, 2016 · 6 comments

Comments

@jadbox
Copy link
Contributor

jadbox commented May 3, 2016

With Yolk v1 beta, I've had to change colSpan to colspan as otherwise the attribute gest removed from the DOM rendering.

@garbles
Copy link
Owner

garbles commented May 3, 2016

This change might fix it? LMK

https://github.com/garbles/yolk/blob/master/src/propertyDescriptors.js#L63

-   colSpan: USE_EQUAL_SETTER | HAS_LOWER_CASE,
+   colSpan: USE_SET_ATTRIBUTE | HAS_LOWER_CASE,

@jadbox
Copy link
Contributor Author

jadbox commented May 3, 2016

Okay, but I'm blocked for now until #89 as I don't have time to fork and rebuild the browser dist we're using atm.

@jadbox
Copy link
Contributor Author

jadbox commented May 3, 2016

I've built against the latest version in master. I still have to use the lowercase colspan to set the property. 😕

https://rawgit.com/jadbox/yolk/better-distributable/dist/yolk.min.js

@jadbox
Copy link
Contributor Author

jadbox commented May 3, 2016

itemProp also no longer seems to function, but in this case, itemprop also doesn't.

@jadbox
Copy link
Contributor Author

jadbox commented May 3, 2016

Setting the data attribute to an object doesn't seem to property set the DOM attributes as it used to with the older version of Yolk. I just get data="[object Object]" as the result in the DOM instead of data-bar="foo"

Example jsx:

<tr data={{"bar":"foo"}} ></tr>

Out:

<tr data="[object Object]" ></tr>

Expected:

<tr data-bar="foo" ></tr>

update:
I see I can just do this now in jsx.. this works for me.

<tr data-bar="foo" ></tr>

@garbles
Copy link
Owner

garbles commented May 4, 2016

Yea you have to use dashes. I didn't like that I was jumping through hoops to make the object case work, unfortunately.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants