PDA

View Full Version : Column renderer does not work anymore with ExtReact 6.6.0



bcourtine
3 Sep 2018, 6:20 AM
Hello,

I tried ExtReact 6.6.0 and have a problem with Column "renderer" prop.

From the boilerplate application from "ext-react-gen app demo", I modified a Column from the "Home" page:



<Column
text={text}
dataIndex={text}
flex={2}
resizable
renderer={ value => "Test " + value }
/>


It works as intended, but only if the renderer function returns text. If the renderer function returns a JSX part, it fails :



<Column
text={text}
dataIndex={text}
flex={2}
resizable
renderer={ value => (<span>{value}</span>) }
/>

fcortina
3 Sep 2018, 7:25 PM
I had to install a new package: @sencha/ext-react-renderercell

Edit: but it does not fix the issue completely. I can't use any component inside the rendered cell.

bcourtine
3 Sep 2018, 9:13 PM
I had to install a new package: @sencha/ext-react-renderercell

Yes. Without this package, the "renderer" prop does not work (even the first example).


Edit: but it does not fix the issue completely. I can't use any component inside the rendered cell.

It is the main issue. Only "* -> text" transformations work. "* -> JSX" does not work, and it is a major problem. If you can only render text transformation, custom renderer loses 90% of its interest.

fcortina
4 Sep 2018, 12:03 AM
Looks like ExtReact breaks when wrapping ExtReact components in normal React components and vice versa.

I've created an other thread to give more details:
https://www.sencha.com/forum/showthread.php?470650-ExtReact-6-6-does-not-work-with-normal-React-components

(au passage: ton nom en français, c'est mon nom en italien ;))

bcourtine
4 Sep 2018, 12:49 AM
(au passage: ton nom en français, c'est mon nom en italien ;))

I didn't notice. Maybe we have common distant parents :))



I've created an other thread to give more details:
https://www.sencha.com/forum/showthread.php?470650-ExtReact-6-6-does-not-work-with-normal-React-components


Thanks for this analyze and your work. I didn't took time to provide a complete GitHub example.

But IMO, this problem occurs even when you don't mix ExtReact/React components. To reproduce it, I created the 6.6.0 demo app ("ext-react-gen app demo"), and just had to modify the Home page Column component (to introduce the renderer).
This one line modification doesn't introduce a custom component and is sufficient to trigger the bug.

Here is the GitHub project where this bug can be reproduced: https://github.com/bcourtine/extreact-660-bugs