- From: Hitallo Exiled <notifications@github.com>
- Date: Sun, 09 Sep 2018 07:51:29 -0700
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/webcomponents/issues/765/419721136@github.com>
@rniwa I figured it might be something like that and there could be some downsides. But the fact that I could get the registered element simply by cloning it deceived me. @caridy I'm working on a data-table component that receives as a dependency a data-provider component. ```html <data-table> <data-provider read-url="/user/read" page-size="10"></data-provider> <template> <column-definition style="width: 50px;" header="Id" field="id"></column-definition> <column-definition header="Name" field="name"></column-definition> <column-definition header="Email" field="email"></column-definition> <column-definition header="Country" field="country.name"></column-definition> <column-definition header="Initials" field="country.initials"></column-definition> <column-definition header="Active" field="active" field-type="boolean"></column-definition> </template> </data-table> ``` The data-table is only aware of the data-provider interface, which can have any implementation. Programmatically, I could simply pass the instance of the provider directly into the component constructor. But I would like to go further and have the option to do the same in a declarative way. In my first scenario, I needed to call the read method of the data-provider already in the construction of the data-table. Currently this is no longer a problem, the fact that I can not depend on a clean way of a child element already in the constructor is making me review some concepts. But that's what led me to the initial conclusion. But I can see something like a recurring pattern in composite components. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/webcomponents/issues/765#issuecomment-419721136
Received on Sunday, 9 September 2018 14:51:51 UTC