Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create GridBuilder #1

Open
8 tasks
angeliski opened this issue May 8, 2019 · 0 comments
Open
8 tasks

Create GridBuilder #1

angeliski opened this issue May 8, 2019 · 0 comments
Labels
enhancement New feature or request epic The main issue for a big feature

Comments

@angeliski
Copy link
Owner

angeliski commented May 8, 2019

Create a column builder to fast development.
The API will be something like:

export default {
  data() {
    return {
      options: GridBuilder.createOptions({
        groupBy: 'name',
        columnDefs: [
          {
            title: 'Product name',
            field: 'name',
            cellType: 'LINK',
            newWindow: true,
            cellLink: entity => `product/edit/${entity.id}`,
          },
          {
            title: 'Price',
            field: 'price',
            topCalc: 'max',
            cellType: 'CURRENCY',
          },
          {
            title: 'Discount',
            field: 'discount',
            cellType: 'PERCENTAGE',
          },
          {
            title: 'Actions',
            cellType: 'ACTION',
            actions: [
              {
                icone: 'fa-pencil',
                color: 'primary',
                events: {
                  click(entity) {
                    this.someMethod(entity);
                  },
                },
              },
              {
                icone: 'fa-times',
                color: 'danger',
                events: {
                  click(entity) {
                    this.someMethodOtherMethod(entity);
                  },
                },
              },
              {
                icone: 'fa-eye',
                color: 'info',
                events: {
                  click(entity) {
                    this.someMethodOtherMethod(entity);
                  },
                },
              },
            ],
          },
        ],
      }, this),
    };
  },
};

Core:

  • GridBuilder
  • CellTypes
  • Default configuration on install plugin
  • Simple way to add others CellTypes

List of cellTypes to implement:

  • - Action
  • - Number
  • - Percentage
  • - Link
@angeliski angeliski added enhancement New feature or request epic The main issue for a big feature labels May 8, 2019
angeliski pushed a commit that referenced this issue May 8, 2019
angeliski pushed a commit that referenced this issue May 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request epic The main issue for a big feature
Projects
None yet
Development

No branches or pull requests

1 participant