Skip to content

Commit

Permalink
add new option to builder
Browse files Browse the repository at this point in the history
  • Loading branch information
sgratzl committed Mar 20, 2020
1 parent 406c20b commit eecfd3f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions src/builder/LineUpBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,20 @@ export default class LineUpBuilder {
return this;
}

livePreviews({search = false, filter = true, vis = true}) {
this.options.livePreviews = [];
if (search) {
this.options.livePreviews.push('search');
}
if (filter) {
this.options.livePreviews.push('filter');
}
if (vis) {
this.options.livePreviews.push('vis');
}
return this;
}

/**
* option to rotate labels on demand in narrow columns
* @param rotation rotation in degrees
Expand Down
2 changes: 1 addition & 1 deletion src/builder/adapter/lineup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {equal, isSame, pick} from './utils';


const providerOptions: (keyof IDataProviderOptions | keyof ILocalDataProviderOptions)[] = ['singleSelection', 'filterGlobally', 'columnTypes', 'taskExecutor', 'jumpToSearchResult'];
const lineupOptions: (keyof IBuilderAdapterProps)[] = ['animated', 'sidePanel', 'sidePanelCollapsed', 'hierarchyIndicator', 'defaultSlopeGraphMode', 'summaryHeader', 'expandLineOnHover', 'overviewMode', 'renderers', 'canRender', 'toolbar', 'rowHeight', 'rowPadding', 'groupHeight', 'groupPadding', 'dynamicHeight', 'labelRotation', 'ignoreUnsupportedBrowser'];
const lineupOptions: (keyof IBuilderAdapterProps)[] = ['animated', 'sidePanel', 'sidePanelCollapsed', 'hierarchyIndicator', 'defaultSlopeGraphMode', 'summaryHeader', 'expandLineOnHover', 'overviewMode', 'renderers', 'canRender', 'toolbar', 'rowHeight', 'rowPadding', 'groupHeight', 'groupPadding', 'dynamicHeight', 'labelRotation', 'ignoreUnsupportedBrowser', 'livePreviews'];

interface IRankingContext {
builders: IBuilderAdapterRankingProps[];
Expand Down

0 comments on commit eecfd3f

Please sign in to comment.