All Projects → madmax983 → Lightning Data Grid

madmax983 / Lightning Data Grid

A data grid for Lightning Component Framework

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Lightning Data Grid

Design System React
Salesforce Lightning Design System for React
Stars: ✭ 676 (+2716.67%)
Mutual labels:  salesforce, lightning
lwc-modules
Build any LWC you want without ever having to touch Apex
Stars: ✭ 20 (-16.67%)
Mutual labels:  lightning, salesforce
Haoide
Stop upgrade, most of features were delivered in https://github.com/xjsender/haoide-vscode
Stars: ✭ 194 (+708.33%)
Mutual labels:  salesforce, lightning
Purealoe
Salesforce Sample App part of the sample gallery. Agriculture and retail use case. Get inspired and learn best practices.
Stars: ✭ 65 (+170.83%)
Mutual labels:  salesforce, lightning
Related-List-LWC
My first real foray into Lightning Web Components - an sobject / list view driven lightning data table
Stars: ✭ 21 (-12.5%)
Mutual labels:  lightning, salesforce
Sfdc Ui Lookup
Salesforce Lookup Component (Aura version, maintenance only, see LWC version for updates)
Stars: ✭ 94 (+291.67%)
Mutual labels:  salesforce, lightning
editable-react-table
React table built to resemble a database.
Stars: ✭ 519 (+2062.5%)
Mutual labels:  datatables, datagrid
sfdc-error-playground
Lightning & Apex Error Playground
Stars: ✭ 30 (+25%)
Mutual labels:  lightning, salesforce
vuetning
Salesforce Lightning Design System framework for Vue.js 2
Stars: ✭ 21 (-12.5%)
Mutual labels:  lightning, salesforce
lwc-redux
Integrate Redux with Lightning Web Component
Stars: ✭ 35 (+45.83%)
Mutual labels:  lightning, salesforce
Django Rest Framework Datatables
Seamless integration between Django REST framework and Datatables.
Stars: ✭ 241 (+904.17%)
Mutual labels:  datagrid, datatables
Datatablesbundle
This Bundle integrates the jQuery DataTables plugin into your Symfony application.
Stars: ✭ 334 (+1291.67%)
Mutual labels:  datagrid, datatables
Django Jinja Knockout
Django datatables and widgets, both AJAX and traditional. Display-only ModelForms. ModelForms / inline formsets with AJAX submit and validation. Works with Django templates.
Stars: ✭ 116 (+383.33%)
Mutual labels:  datagrid, datatables
Create Lwc App
Quickstart command line interface for scaffolding your Lightning Web Components projects
Stars: ✭ 144 (+500%)
Mutual labels:  salesforce, lightning
SF-Lightning-Lookup
Salesforce lightning dynamic lookup component.
Stars: ✭ 15 (-37.5%)
Mutual labels:  lightning, salesforce
server-action-service
Generic and reusable Lightning service component that calls server-side actions
Stars: ✭ 19 (-20.83%)
Mutual labels:  lightning, salesforce
Salesforcedx Vscode
Salesforce Extensions for VS Code
Stars: ✭ 653 (+2620.83%)
Mutual labels:  salesforce, lightning
Sfdc Trigger Framework
A minimal trigger framework for your Salesforce Apex Triggers
Stars: ✭ 527 (+2095.83%)
Mutual labels:  salesforce
Canvas Datagrid
Canvas based data grid web component. Capable of displaying millions of contiguous hierarchical rows and columns without paging or loading, on a single canvas element.
Stars: ✭ 798 (+3225%)
Mutual labels:  datagrid
Ajax Datatables Rails
A wrapper around DataTable's ajax methods that allow synchronization with server-side pagination in a Rails app
Stars: ✭ 520 (+2066.67%)
Mutual labels:  datatables

Deploy Deploy to Salesforce

Lightning-Data-Grid No Maintenance Intended

A data grid for the Lightning Component Framework

screenshot of lightning data grid

You probably do not need this. The lightning:datatable and lightning:treegrid(Coming in Spring '18!) base components probably fulfill your use case, and you should look at those components first. However, if your use case for a data grid is not fulfilled by either of those two base components, Lightning-Data-Grid might be the answer. This component is intended as an extensible and low-level data grid that can be built up into more usable components. Currently supports inline-editing of hierarchical data , virtual scrolling, and global search. This is still a huge WIP, use as your own risk.

Quick Demo Setup

  1. Click on Deploy to SFDX button.
  2. Navigate to a page you want to add the data grid component.
  3. Add in the DataGridImpl component to a page layout.

About

The Data Grid contains a toolbar component, a header component (right now this just renders the column names, in the future it can contain filtering/column menus), a row component, and a cell component.

The Data Grid currently has a pretty simple API, it expects a config javascript object, and a data javascript object.

The config should look like:

{
  columns: [
      {
          name: "columnName that matches the name of the dataField",
          label: "Label string that is displayed for the column header"
      }
  ],
  rowsDisplayed: *Integer*,
  scrollable: *boolean*,
  editable: *boolean*
}

columns: Column definition of the data grid. Requires name and label for rendering. Any properties you set here will get populated down to the cell decorators and cell editors.

rowsDisplayed: How many rows are initially rendered. Control how big the table is!

scrollable: Enables virtual scrolling on desktop.

editable: You can control whether the entire grid is editable. Columns also take an editable flag, so you can control it ast the column level as well.

The data object currently takes the following shape:

{
    data: {
        id: "dataId",
        name: "dataName"
        etc . . . These keys should match your column names, and is how the data in the row will get displayed
    },
    parent: null
}

Right now I am trying to keep the actual record data separate from some of the row properties needed for displaying hierarchies and such. This way you only have to extract the data object out of the row data, instead of doing a bunch of property deleting, which is always fun.

Explanation of other properties:

parent: id of the parent row for a child row. In the future, I would like to be able to determine this via configuration, and specify a parent field within the data object.

Decorators and Editors implement the cellFacet interface. Check out the defaultDecorator, defaultEditor, programmaticDecorator, and programmaticEditor for examples. The two default use aura:if for their implementation, while the two programmatic components perform their logic with a javascript controller and $A.createComponent. They get fed the cell value and the associated column data. The general idea is to conditionally render a component based on that information.

You can look at the DefaultSearch component to see how a global search for the grid is being implemented, and how you could change it to implement your own search. The GetAttribute event can be used to get any attribute off of the grid, and takes a callback that can be invoked with that value. The DefaultSearch uses this get the grid data, but it can be used for other use cases outside of this. It then filters out the matches it wants, and sends a GridViewMutation event, which sets the current grid view. The plan is to use this event for sorting and filtering as well.

Look at DataGridImpl component for an example of all of this being setup.

Methods

Init: Once you have the data for the Grid, you can call the init method on it, and the grid will take care of setting everything up and rendering the view. Refresh: Call refresh on the grid when you change the data structure.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].