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

Function getGroupClauses

docs/app/js/sanddance-app.js:12535–12566  ·  view source on GitHub ↗
(currClause, index, disableGroupOR)

Source from the content-addressed store, hash-verified

12533 if (s.length !== 0) ex.errorMessage = null;
12534}
12535function getGroupClauses(currClause, index, disableGroupOR) {
12536 let keys;
12537 if (index === 0) keys = [
12538 [
12539 null,
12540 (0, _language.strings).searchWHERE
12541 ]
12542 ];
12543 else {
12544 keys = [
12545 [
12546 "&&",
12547 (0, _language.strings).searchAND
12548 ]
12549 ];
12550 if (!disableGroupOR) keys.push([
12551 "||",
12552 (0, _language.strings).searchOR
12553 ]);
12554 }
12555 return keys.map((key, i)=>{
12556 const [clause, text] = key;
12557 const selected = currClause == clause; //deliberate double equal
12558 const option = {
12559 key: i,
12560 text,
12561 data: clause,
12562 selected
12563 };
12564 return option;
12565 });
12566}
12567function _Search(_props) {
12568 class __Search extends (0, _base.base).react.Component {
12569 constructor(props){

Callers 1

renderMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected