MCPcopy Create free account
hub / github.com/microsoft/SandDance / render

Method render

docs/app/js/sanddance-app.js:12717–12777  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12715 });
12716 }
12717 render() {
12718 return (0, _base.base).react.createElement((0, _group.Group), {
12719 className: "sanddance-search",
12720 label: (0, _language.strings).labelSearch
12721 }, (0, _base.base).react.createElement("div", null, this.state.groups.map((group, groupIndex)=>(0, _base.base).react.createElement("div", {
12722 className: "sanddance-search-group",
12723 key: group.key
12724 }, (0, _base.base).react.createElement((0, _dropdown.Dropdown), {
12725 collapseLabel: this.props.collapseLabels,
12726 className: "search-group-clause",
12727 label: (0, _language.strings).labelSearchClause,
12728 disabled: groupIndex === 0 || this.props.disableGroupOR,
12729 dropdownWidth: 120,
12730 options: getGroupClauses(group.clause, groupIndex, this.props.disableGroupOR),
12731 onChange: (e, o)=>this.updateGroup({
12732 clause: o.data
12733 }, groupIndex)
12734 }), (0, _base.base).react.createElement("div", null, group.expressions.map((ex1, i1)=>(0, _base.base).react.createElement("div", {
12735 className: "sanddance-search-expression",
12736 key: ex1.key
12737 }, (0, _base.base).react.createElement((0, _searchTerm.SearchTerm), {
12738 dropdownRef: groupIndex === 0 && i1 === 0 ? this.dropdownRef : undefined,
12739 collapseLabels: this.props.collapseLabels,
12740 onUpdateExpression: (ex, i)=>this.updateExpression(ex, groupIndex, i),
12741 autoCompleteDistinctValues: this.props.autoCompleteDistinctValues,
12742 index: i1,
12743 columns: this.state.sortedColumns,
12744 data: this.props.data,
12745 searchExpression: ex1,
12746 disableOR: this.props.disableExpressionOR,
12747 column: getColumnWithName(ex1.name, this.state.sortedColumns)
12748 }), group.expressions.length > 1 && (0, _base.base).react.createElement((0, _button.Button), {
12749 themePalette: this.props.themePalette,
12750 className: "search-action",
12751 iconName: "Cancel",
12752 onClick: ()=>this.deleteExpression(groupIndex, i1),
12753 text: (0, _language.strings).buttonDeleteExpression
12754 })))), group.expressions.length < maxClauses && (0, _base.base).react.createElement("div", null, (0, _base.base).react.createElement((0, _button.Button), {
12755 themePalette: this.props.themePalette,
12756 className: "search-action",
12757 iconName: "Add",
12758 onClick: ()=>this.addExpression(groupIndex),
12759 text: (0, _language.strings).buttonAddExpression
12760 })), this.state.groups.length > 1 && (0, _base.base).react.createElement((0, _button.Button), {
12761 themePalette: this.props.themePalette,
12762 className: "search-action",
12763 iconName: "Cancel",
12764 onClick: ()=>this.deleteGroup(groupIndex),
12765 text: (0, _language.strings).buttonDeleteExpressionGroup
12766 }))), this.state.groups.length < maxClauses && (0, _base.base).react.createElement("div", null, (0, _base.base).react.createElement((0, _button.Button), {
12767 themePalette: this.props.themePalette,
12768 className: "search-action search-bottom-action",
12769 iconName: "Add",
12770 onClick: ()=>this.addGroup(),
12771 text: (0, _language.strings).buttonAddExpressionGroup
12772 }))), (0, _base.base).react.createElement((0, _base.base).fluentUI.PrimaryButton, {
12773 className: "search-action search-bottom-action",
12774 text: (0, _language.strings).buttonSelect,

Callers

nothing calls this directly

Calls 9

updateGroupMethod · 0.95
updateExpressionMethod · 0.95
deleteExpressionMethod · 0.95
addExpressionMethod · 0.95
deleteGroupMethod · 0.95
addGroupMethod · 0.95
validateAndSearchMethod · 0.95
getGroupClausesFunction · 0.70
getColumnWithNameFunction · 0.70

Tested by

no test coverage detected