reflex-frp / reflex-dom-semui

A reflex-dom API for Semantic UI components
https://reflex-frp.org/
BSD 3-Clause "New" or "Revised" License
22 stars 10 forks source link

Support ADVANCED_OPTIMIZATIONS #26

Closed 3noch closed 6 years ago

3noch commented 6 years ago

All that is needed is modifying FFI to use x['attr'] syntax instead of x.attr.

3noch commented 6 years ago

I should note that this is issue is cleverly avoided when you add all the semantic-ui sources to the cabal file, as is done in this project. However, this leads to other annoying issues and is also far less flexible (you can't choose which semantic-ui modules to use, for example).

mightybyte commented 6 years ago

Thanks for the suggestion. Check out the latest commit.

3noch commented 6 years ago

Awesome! I was quite literally a couple hours too late in making one more comment:

You also need to construct the option objects using syntax like this:

opts = {};
opts['onChange'] = function() {...};
jQuery($...)['...'](opts);

because some of those fields still get renamed and GHCJS does not provide any way to preserve quotes on the field names (e.g. { "onChange": ... }).