UNPKG

@atlaskit/editor-plugin-table

Version:

Table plugin for the @atlaskit/editor

19 lines (18 loc) 540 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.findStickyHeaderForTable = void 0; // only worry about the first row for now var findStickyHeaderForTable = exports.findStickyHeaderForTable = function findStickyHeaderForTable(state, tablePos) { if (!state || tablePos === undefined) { return undefined; } var rowInfo = state.find(function (rowInfo) { return rowInfo.pos === tablePos + 1; }); if (!rowInfo) { return undefined; } return rowInfo.sticky ? rowInfo : undefined; };