UNPKG

@atlaskit/editor-plugin-table

Version:

Table plugin for the @atlaskit/editor

11 lines 337 B
// only worry about the first row for now export const findStickyHeaderForTable = (state, tablePos) => { if (!state || tablePos === undefined) { return undefined; } const rowInfo = state.find(rowInfo => rowInfo.pos === tablePos + 1); if (!rowInfo) { return undefined; } return rowInfo.sticky ? rowInfo : undefined; };