gd-sprest-js
Version:
SharePoint 2013/Online js components.
21 lines (20 loc) • 639 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var _1 = require(".");
/**
* Table
*/
exports.Table = function (props) {
// Returns the fabric component
var get = function () { return _table; };
// Returns the selected table rows
var getSelectedRows = function () { return _table.container.querySelectorAll("tbody>tr.is-selected"); };
// Create the table
props.el.innerHTML = _1.Templates.Table(props);
var _table = new _1.fabric.Table(props.el.querySelector(".ms-Table"));
// Return the table
return {
get: get,
getSelectedRows: getSelectedRows
};
};