surface-ui / surface

A server-side rendering component library for Phoenix
https://surface-ui.org
MIT License
2.08k stars 150 forks source link

Compilation fails when attempting to dynamically create slots with `generator_prop` #667

Closed VictorGaiva closed 2 years ago

VictorGaiva commented 2 years ago

Describe the bug

In a Table component, with a Column slot, attempting to dynamically generate theses columns crashes the compiler.

Screenshot from 2022-10-18 12-18-50

Code ![Screenshot from 2022-10-18 12-24-12](https://user-images.githubusercontent.com/13839490/196473873-d6b47958-6623-43e1-8287-346cb98602c2.png) ![Screenshot from 2022-10-18 12-24-06](https://user-images.githubusercontent.com/13839490/196473875-b7973f5c-de40-4682-ad28-b2c2e9ddeecd.png) ![Screenshot from 2022-10-18 12-24-00](https://user-images.githubusercontent.com/13839490/196473876-99eac6ab-c38d-4cdd-bcd2-40f105258afb.png) ![Screenshot from 2022-10-18 12-17-20](https://user-images.githubusercontent.com/13839490/196473578-f06a1194-65f5-44ca-9772-44dc05d6910e.png)

Your Environment

Surface: v0.9.1 LiveView: v0.18.2 Elixir: v1.14.1

msaraiva commented 2 years ago

Hi @VictorGaiva!

Unfortunately, it's not possible to dynamically generate slots in Surface nor in LV. Unless this feature has recently been added to LV itself, there's not much we can do on our side.