@gridsheet/preact-core 2.0.3 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/FormulaBar.d.ts +5 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10416,7 +10416,7 @@ const embedStyle = () => {
|
|
|
10416
10416
|
style.setAttribute("data-modified-at", `${LAST_MODIFIED}`);
|
|
10417
10417
|
style.innerText = CSS;
|
|
10418
10418
|
};
|
|
10419
|
-
const FormulaBar = () => {
|
|
10419
|
+
const FormulaBar = ({ ready }) => {
|
|
10420
10420
|
var _a;
|
|
10421
10421
|
const { store, dispatch } = useContext(Context);
|
|
10422
10422
|
const [before, setBefore] = useState("");
|
|
@@ -10465,7 +10465,6 @@ const FormulaBar = () => {
|
|
|
10465
10465
|
}, []);
|
|
10466
10466
|
const largeInput = largeEditorRef.current;
|
|
10467
10467
|
const handleInput = useCallback((e) => {
|
|
10468
|
-
console.log("e.currentTarget.value", e.currentTarget.value);
|
|
10469
10468
|
dispatch(setInputting(e.currentTarget.value));
|
|
10470
10469
|
}, []);
|
|
10471
10470
|
const updateScroll = useCallback(() => {
|
|
@@ -10557,14 +10556,15 @@ const FormulaBar = () => {
|
|
|
10557
10556
|
},
|
|
10558
10557
|
[table, choosing, before, writeCell, updateScroll]
|
|
10559
10558
|
);
|
|
10559
|
+
const style = ready ? {} : { visibility: "hidden" };
|
|
10560
10560
|
if (!table) {
|
|
10561
|
-
return /* @__PURE__ */ jsxs("label", { className: "gs-formula-bar gs-hidden", children: [
|
|
10561
|
+
return /* @__PURE__ */ jsxs("label", { className: "gs-formula-bar gs-hidden", style, children: [
|
|
10562
10562
|
/* @__PURE__ */ jsx("div", { className: "gs-selecting-address" }),
|
|
10563
10563
|
/* @__PURE__ */ jsx("div", { className: "gs-fx", children: "Fx" }),
|
|
10564
10564
|
/* @__PURE__ */ jsx("div", { className: "gs-formula-bar-editor-inner", children: /* @__PURE__ */ jsx("textarea", {}) })
|
|
10565
10565
|
] });
|
|
10566
10566
|
}
|
|
10567
|
-
return /* @__PURE__ */ jsxs("label", { className: "gs-formula-bar", children: [
|
|
10567
|
+
return /* @__PURE__ */ jsxs("label", { className: "gs-formula-bar", "data-sheet-id": store.sheetId, style, children: [
|
|
10568
10568
|
/* @__PURE__ */ jsx(ScrollHandle, { style: { position: "absolute", left: 0, top: 0, zIndex: 2 }, vertical: -1 }),
|
|
10569
10569
|
/* @__PURE__ */ jsx("div", { className: "gs-selecting-address", children: address }),
|
|
10570
10570
|
/* @__PURE__ */ jsx("div", { className: "gs-fx", children: "Fx" }),
|
|
@@ -10852,7 +10852,7 @@ function GridSheet({
|
|
|
10852
10852
|
/* @__PURE__ */ jsx(ScrollHandle, { style: { position: "fixed", top: 0, left: 0 } }),
|
|
10853
10853
|
/* @__PURE__ */ jsx(ScrollHandle, { style: { position: "absolute", zIndex: 4, right: 0, top: 0, width: 5 }, horizontal: 1 }),
|
|
10854
10854
|
/* @__PURE__ */ jsx(ScrollHandle, { style: { position: "absolute", zIndex: 4, left: 0, bottom: 0, height: 5 }, vertical: 1 }),
|
|
10855
|
-
typeof store.searchQuery === "undefined" ? showFormulaBar && /* @__PURE__ */ jsx(FormulaBar, {}) : /* @__PURE__ */ jsx(SearchBar, {}),
|
|
10855
|
+
typeof store.searchQuery === "undefined" ? showFormulaBar && /* @__PURE__ */ jsx(FormulaBar, { ready: wire.ready }) : /* @__PURE__ */ jsx(SearchBar, {}),
|
|
10856
10856
|
/* @__PURE__ */ jsxs(
|
|
10857
10857
|
"div",
|
|
10858
10858
|
{
|