This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-09-09
Channels
- # announcements (1)
- # aws-lambda (3)
- # babashka (6)
- # beginners (91)
- # bristol-clojurians (5)
- # calva (25)
- # chlorine-clover (8)
- # cider (6)
- # clj-kondo (13)
- # cljdoc (10)
- # cljsrn (1)
- # clojure (80)
- # clojure-berlin (6)
- # clojure-europe (29)
- # clojure-nl (4)
- # clojure-spec (18)
- # clojure-uk (51)
- # clojurescript (41)
- # conjure (55)
- # cursive (3)
- # datomic (58)
- # emacs (9)
- # events (1)
- # figwheel-main (2)
- # fulcro (29)
- # graphql (12)
- # helix (4)
- # jobs (4)
- # klipse (8)
- # london-clojurians (1)
- # malli (5)
- # off-topic (13)
- # portal (9)
- # re-frame (30)
- # shadow-cljs (44)
- # spacemacs (7)
- # specter (3)
- # sql (11)
- # tools-deps (71)
- # windows (1)
- # xtdb (10)
Hello all, I have this ->
import { Filter, FilterSettingsModel, GridComponent, IFilter, Inject } from '@syncfusion/ej2-react-grids'
with
export default class App extends React.Component<{}, {}>{
public Filter : IFilter = {
type: 'CheckBox'
}
public render() {
return <GridComponent dataSource={data} filterSettings={this.FilterOptions}
allowFiltering={true} height={273}>
<ColumnsDirective>
<ColumnDirective field='OrderID' width='100' textAlign="Right"/>
<ColumnDirective field='CustomerID' filter={this.Filter} width='100'/>
<ColumnDirective field='EmployeeID' width='100' textAlign="Right"/>
<ColumnDirective field='Freight' width='100' format="C2" textAlign="Right"/>
<ColumnDirective field='ShipCountry' width='100'/>
</ColumnsDirective>
<Inject services={[Filter]} />
</GridComponent>
}
}
How do I use `services={[Filter]}` with CLJS? IFilter
interface what?@fabrao I answered your question in #helix . it’s best not to cross post many channels
its just #js [#js {:type "CheckBox"}]
I presume, not actually a clue if typescripts adds anything
I'd assume that the public Filter = { type: "CheckBox" }
is just regular property syntax?
@lilactown btw didn't you write something to generate ES class
or did you want to do that?
ahhh I was thrown off by the indentation, I thought that was a part of the type of App
this is what I’m using in helix: https://github.com/lilactown/helix/blob/master/src/helix/impl/classes.js
(defclass Something
(extends SomethingElse)
(field foo 1)
(field bar)
(constructor [this x]
(super "foo")
(set! bar (+ foo x)))
Object
(someMethod [this foo])
SomeProtocol
(foo [this bar]))
generates an actual some.ns.Something = class some$ns$Something { constructor(x) { ... }}
I had high hopes to create a patch for CLJS to actually emit class
but then life happened. I think someone created a library that does it by extending/altering the compiler at a distance
https://github.com/thheller/shadow-cljs/commit/106dcda807c048fbe56adaf00f35b7f196113b39
got really tired of doing this shit since there was no other way to do stuff in the "constructor"
I’m not dropping React anytime soon… or ever. I think I really just want something else to do
typically don't write much of this kind of mutable code but sometimes you just have to 😛
yeah there’s a lot of this in a lib i’ve been working on: https://github.com/lilactown/serenity/blob/clj/src/serenity/core.clj#L191