Element: <ins-input-table>
Renders editable table. To see the mobile version, resize your browser to mobile phone resolution or view it on your mobile phone.
Code Snippet
<ins-input-table id="inputTableEl" label="Input Table"> </ins-input-table> <script type="text/javascript"> var inputTableEl = document.getElementById('inputTableEl'); inputTableEl.tableHeaders = [ { name: "column_1", label: "Column 1" }, { name: "column_2", label: "Column 2" }, { name: "column_3", label: "Column 3" } ]; </script>
Code Snippet
<ins-input-table id="directSetDataEl" label="Direct Set Data"> </ins-input-table> <script type="text/javascript"> var directSetDataEl = document.getElementById('directSetDataEl'); directSetDataEl.tableHeaders = [ { name: "column_1", label: "Column 1" }, { name: "column_2", label: "Column 2" }, { name: "column_3", label: "Column 3" } ]; setTimeout(function() { directSetDataEl.setValue([ { column_1: "1", column_2: "2", column_3: "3" }, { column_1: "4", column_2: "5", column_3: "6" }, { column_1: "7", column_2: "8", column_3: "9" } ]); }, 300); </script>
Code Snippet
<ins-input-table label="Table" has-error error-message="This field is required." table-headers='[{ "name": "column_1", "label": "Column 1" },{ "name": "column_2", "label": "Column 2" }]'> </ins-input-table>
Code Snippet
<ins-input-table label="Table" readonly table-headers='[{ "name": "column_1", "label": "Column 1" },{ "name": "column_2", "label": "Column 2" }]'> </ins-input-table>
Code Snippet
<ins-input-table label="Table" disabled table-headers='[{ "name": "column_1", "label": "Column 1" },{ "name": "column_2", "label": "Column 2" }]'> </ins-input-table>
Code Snippet
<ins-input-table label="Table" table-headers='[{ "name": "column_1", "label": "Column 1" },{ "name": "column_2", "label": "Column 2" }]' add-button-icon="icon-plus-circle" remove-button-icon="icon-minus-circle" add-button-color="green" remove-button-color="red"> </ins-input-table>
FIELD ATTRIBUTE | TYPE | DEFAULT | OPTIONS | DESCRIPTION |
---|---|---|---|---|
label | string | any | Defines label of component | |
tableHeaders | array | [] | any | Defines the table column headers |
add-button-icon | string | "icon-plus" | any | Defines the icon used in the add button |
remove-button-icon | string | "icon-minus" | any | Defines the icon used in the remove button |
add-button-color | string | "blue" | any | Defines the color of the add button |
remove-button-color | string | "blue" | any | Defines the colo of the remove button |
readonly | boolean | false | true, false | Specifies that the component is read-only |
disabled | boolean | false | true, false | Specifies that the component is disabled |
button | boolean | false | true, false | Merges label and placeholder into a single button dropdown |
has-error | boolean | false | true, false | Specifies validation or mandatory input for the input field |
error-message | string | "" | any | Defines the error message when input element is wrong |
tooltip | string | "" | - | Displays a tooltip beside the label. Supports HTML Content |
EVENT | OBJECT | DESCRIPTION |
---|---|---|
insInput | value | Emits the value when component values changed. Returns array object. |
setValue | ||
getValue |
Didn't quite find what you are looking for or have feedback on how we can make the content better then we would love to hear from you. Please provide us feedback and we will get back to you shortly.