antizer icon indicating copy to clipboard operation
antizer copied to clipboard

Table dataSource not being camel cased automatically

Open AndreaCrotti opened this issue 4 years ago • 2 comments

If I do something like

[ant/table {:data-source [..]}

it doesn't work, while [ant/table {:dataSource [...]}] works as expected. Checking the code it looks like it should work really

(ac/map-keys->camel-case {:data-source "hello"})
{"dataSource" "hello"}```

Any idea about what could be the issue?

AndreaCrotti avatar Aug 20 '19 16:08 AndreaCrotti

Actually the problem seems to be with all the table opts, also filterDropdownVisible has the same problem for example.

AndreaCrotti avatar Aug 27 '19 13:08 AndreaCrotti

It's Reagent that does the case conversion here, and it ignores any keys that start with data-: https://github.com/reagent-project/reagent/blob/v0.8.1/src/reagent/impl/util.cljs#L32-L39

ash14 avatar Oct 01 '19 06:10 ash14