Add grid display type for modules and formatters

But would that be easy for end user from a UI perspective?

Say I want to concatenate an array with an undefined number of arrays in one go. Not by chaining 15 concat functions :slight_smile:

I was thinking that the end user could input in the enum type the arrays he needs(one per enum parameter) and I could pass that undefined number of arrays to the function to concatenate.

var length = arguments.length;
      if (!length) {
        return [];
      }
      var args = Array(length - 1),
          array = arguments[0],
          index = length;

      while (index--) {
        args[index - 1] = arguments[index];
      }

Oooh you want to pass an array of values? Name / value perhaps?

That’s it. I want the end user to be able to pass an undefined number of arrays of values but giving them the option of using the UI and the SC bindings, thus why I though of the enum display type.

fruits = [“banana”, “apple”]

Say user SC function is going to produce these arrays during the execution

arr1 = [“pear”, “lemon”]
arr2 = “pineapple”
arr3 = “”
arr4 = [“banana”]
…
arrN = [“strawberry”, “grape”]

At the end they want to concatenate everything so I am creating a formatter for this

fruits.concat(arr1, arr2, arr3, arr4,…,arrN)

So I though lets give them the enum display type so they can bind the value to those arr1…arrN and they can call the keys whatever they want because I just need the values of each pair they add.

we have the grid control type for that :slight_smile: just we haven’t documented it yet. Let me see what I can do

Thanks.

Actually I thought that the enum was the grid control(the one in the API actions) due to the description. But now that I think twice about it I know which one it is. Enum is the one for the AC event modifiers, right?

hmm re-reading your array description, seems you don’t need a grid … but just an unlimitted number of arrays as parameters …? not really sure what you are trying to achieve

I am implementing lodash fully.

For the issue we are discussing this method.

https://lodash.com/docs/4.17.15#concat

No enum is just multi select dropdown

You want to add values to an array? with a formatter?

Makes no sense, right?

That is the problem with lodash library. It consists of a mix of pure formatters, but then it has some functions that seem to belong more to a module.

In principle I don’t want to confuse people as to where to find lodash functions (i.e. these are custom formatters and these others are modules so you need to install this here and that there)

If async was a requirement I would have to go through the module route, but lodash is sync so that’s not an issue.

Well with our upcoming data transformations library, we initially went also for formatters and added many array/collections transformations like adding columns, filtering, merging.

But because of the sync working of formatters and the large delay they can have in processing data, we went to implement those as regular modules. So those can be used as action steps.

If you are already working on something like that I can put lodash on hold. I don’t want to duplicate options if you are adding something similar to the core.

yes this seems wiser to me. The data transformation library will solve it all. We just hadn’t had time to pack it all up yet :slight_smile:

Also lodash is kind of getting outfaced, as it is too generic and also modern javascript has it all build in. So it is heading the jquery way …

If you are looking for new challenges - maybe you can check GraphQL :slight_smile: we are brainstorming for good integration :slight_smile:

1 Like

A post was split to a new topic: Brainstorming about GraphQL

Hi @George . Can you please share some code on how to configure a grid. I can see the UI being generated, but its a single column, and I can’t edit the value either.
I would like to have something like input/query/header guys in API Action.

@patrick can you please help here?

Has anyone tried the Grid type of property? Can some one help here? @patrick @Teodor

Sorry Sid, haven’t tried this one yet.

1 Like

I am using the grid type as per the code my team found in one of the built in components in the new file upload extension. Can the team please vet it and confirm if its the right implementation?

P.S. Thanks again @mebeingken :pray:

Will the documentation be prepared for grid control type ? @George