(() => {
+ if (selectedIndex === 0) {
+ return [
+ { column: "currency", name: "Filter One", op: "=", value: "EUR" },
+ { column: "exchange", name: "Filter Two", op: "=", value: "XLON" },
+ {
+ column: "ric",
+ name: "Filter Three",
+ op: "in",
+ values: ["AAPL", "BP.L", "VOD.L"],
+ },
+ ];
+ } else if (selectedIndex === 1) {
+ return [
+ {
+ column: "ric",
+ name: "Filter Four",
+ op: "in",
+ values: ["AAPL", "BP.L", "VOD.L", "TSLA"],
+ },
+ {
+ op: "and",
+ name: "Filter Five",
+ filters: [
+ { column: "ric", op: "in", values: ["AAPL", "VOD.L"] },
+ { column: "exchange", op: "=", value: "NASDAQ" },
+ { column: "price", op: ">", value: 1000 },
+ ],
+ },
+ ];
+ } else {
+ throw Error(`selectedIndex ${selectedIndex} out of range`);
+ }
+ }, [selectedIndex]);
+
+ console.log({ filters });
+ return (
+
+
+ Filter Set 1 (three filters)
+ Filter Set 2 (two filters)
+
+
+
+ );
+};
+FilterBarMultipleFilterSets.displaySequence = displaySequence++;