I'm not sure; it is a good question. I will have to experiment.

The DataGridModel works with ArrayList now. What I would do is change it
to work with Array and then make a new model for the ArrayList or
ICollectionView, which to me, is a better choice over ArrayList since its
an interface and more adaptable.


‹peter

On 1/17/18, 4:07 PM, "Piotr Zarzycki" <piotrzarzyck...@gmail.com> wrote:

>Hi Peter,
>
>To me it is a good change. I was always wondering why DG is working with
>ArrayList default. However let's say that I wanted to switch some of the
>beads for that DataGrid or add some custom class. How am I supposed to add
>second css class ?
>
>If I have this: <js:DataGrid className="DynamicDataGrid"> and I have
>something in my css file .myAdditionalClass {  }. Will it work ?
>
><js:DataGrid className="DynamicDataGrid myAdditionalClass">
>
>Thanks, Piotr
>
>2018-01-17 20:58 GMT+01:00 Alex Harui <aha...@adobe.com.invalid>:
>
>> IMO, the DataGrid in Basic should work with Arrays and a different set
>>of
>> beads allow it to work with ArrayList and another set of beads provides
>> detection of changes to the ArrayList.  As long as we have those beads
>> (and maybe some tests/examples to prove it all works), the default set
>>of
>> beads is less important. That decision should be driven by users and
>>maybe
>> by us if there is some other goal we want to hit (like making an example
>> be smaller than some number of bytes.
>>
>> If you are going to create a style definition of DynamicDataGrid should
>> also create a DynamicDataGrid class that packs in the required set of
>> beads.
>>
>> The DataGrid in Express will likely evolve to pack a set of beads that
>> don't care if the data provider is an Array or ArrayList.  For now it
>>can
>> just assume ArrayList.
>>
>> My 2 cents,
>> -Alex
>>
>> On 1/17/18, 11:43 AM, "Peter Ent" <p...@adobe.com.INVALID> wrote:
>>
>> >Hi,
>> >
>> >I'm proposing a change to DataGrid default configuration. Right now
>> >DataGrid is designed to work with ArrayList; its does not work with
>> >Array. I propose that the default configuration for DataGrid is to use
>> >Array as its dataProvider and provide no dynamic abilities.
>> >
>> >We would include in the defaults.css a style definition,
>> >DynamicDataGrid, which would set up DataGrid to use the more dynamic
>> >ICollectionView set of beads. When items were added or removed from the
>> >dataProvider, the grid would automatically reflect the change.
>> >
>> >Doing this would provide a better PAYG experience. Or do you think
>> >DataGrid is too advanced to bother with Array at all?
>> >
>> ><js:DataGrid> would require its dataProvider be an Array.
>> ><js:DataGrid className="DynamicDataGrid"> would require its
>>dataProvider
>> >be ArrayList (or any thing that implements ICollectionView).
>> >
>> >What do you think? Should DataGrid's default configuration work with
>> >Array and then use PAYG to upgrade it to more dynamic components if
>> >that's what the developer wants?
>> >
>> >One more thing: the List's default configuration uses Array and you
>>have
>> >to add dynamic beads if you want it to respond to changes. I would also
>> >add a "DynamicList" style to make it easier to do that. This way there
>>is
>> >consistency between List and DataGrid.
>> >
>> ><js:List> would require its dataProvider to be an Array.
>> ><js:List className="DynamicList"> would require its dataProvider to be
>> >ArrayList (or any thing that implements ICollectionView).
>> >
>> >Thanks,
>> >Peter
>> >
>> >
>>
>>
>
>
>-- 
>
>Piotr Zarzycki
>
>Patreon: 
>*https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patr
>eon.com%2Fpiotrzarzycki&data=02%7C01%7Cpent%40adobe.com%7C0e49839e7e584159
>267908d55dee5e4d%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636518200725
>558336&sdata=VsmG4W6WXx5v2%2Blfa3s9ieXuVsjCv%2BRWa84LNf6W11M%3D&reserved=0
><https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patr
>eon.com%2Fpiotrzarzycki&data=02%7C01%7Cpent%40adobe.com%7C0e49839e7e584159
>267908d55dee5e4d%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636518200725
>558336&sdata=VsmG4W6WXx5v2%2Blfa3s9ieXuVsjCv%2BRWa84LNf6W11M%3D&reserved=0
>>*

Reply via email to