diff --git a/README.md b/README.md index 93f55cc..32dd9cb 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ using REST API. - Pagination - Sortable columns - Configurable column widths +- Editable table - Built in windowing to handle large dataset with thousands of rows - Customizable limiter options - Customizable toolbar with the ability to add custom renderers @@ -217,8 +218,8 @@ const YourComponent = () => | toolbar | array | false | \[] | Toolbar definition (Check below) | | columns | array | true | - | Columns to display | | styles | object | false | {} | Custom styles for your table | -| isEditable | boolean | false | {} | Set whether the table is editable | -| isEditing | boolean | false | {} | Set the default state of the table to be in editing mode | +| editable | boolean | false | {} | Set whether the table is editable | +| editing | boolean | false | {} | Set the default state of the table to be in editing mode | | primaryKey | string | true | {} | Set the primary key column of the table for actions like editing. | #### Pagination object @@ -278,7 +279,7 @@ Note: action of type "editable" is required when you set the table to be editabl | label | string | true | - | Label for the column | | sortable | boolean | false | true | Whether the column is sortable | | filterable | boolean | false | true | Whether the column is filterable | -| isEditable | boolean | false | false | When the table is set to be editable, set whether the respective column is among the editable | +| editable | boolean | false | false | When the table is set to be editable, set whether the respective column is among the editable | | visible | boolean | false | true | Whether the column is visible on load | | type | string | true | string | Available types: selection, number, date, string, image, options, actions | | width | integer | true | - | Width of the column | diff --git a/demo/src/schema/basic.js b/demo/src/schema/basic.js index a78fb66..80828f0 100644 --- a/demo/src/schema/basic.js +++ b/demo/src/schema/basic.js @@ -6,8 +6,8 @@ export default { rowHeight: 50, filterable: true, headers: true, - isEditable: true, - isEditing: false, + editable: true, + editing: false, primaryKey: 'pageId', // styles: { // loader: { @@ -222,7 +222,7 @@ export default { width: 150, filterable: true, sortable: true, - // isEditable: true + // editable: true }, { label: "Status", type: "options", @@ -250,7 +250,7 @@ export default { "label": "Archived" } }, - isEditable: true + editable: true // renderer: ({ // data, // colConfig: { name, options } @@ -262,7 +262,7 @@ export default { sortable: true, textAlign: 'left', width: 200, - isEditable: true, + editable: true, filterable: true, }, { label: 'Actions', diff --git a/package-lock.json b/package-lock.json index e1706b7..3969d62 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@flipbyte/redux-datatable", - "version": "0.5.0", + "version": "0.5.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 94fb889..b6897a0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@flipbyte/redux-datatable", - "version": "0.5.0", + "version": "0.5.1", "description": "React-Redux data table", "main": "lib/index.js", "module": "es/index.js", diff --git a/src/Renderer/Body/Date.js b/src/Renderer/Body/Date.js index f730840..c017314 100644 --- a/src/Renderer/Body/Date.js +++ b/src/Renderer/Body/Date.js @@ -10,11 +10,11 @@ const Date = ({ isEditing, handleChange, modifiedData, - colConfig: { name, textAlign, format, isEditable } + colConfig: { name, textAlign, format, editable } }) => ( - { (!isEditable || !isEditing) &&