Skip to content

Commit 5003cc1

Browse files
Fix/resource path invalid (#53)
* refactor(ui): Fix resource path property name to camelCase Rename `resource_path` to `resourcePath` and update references in templates. * fix: Update nicegui dependency version Bump nicegui from ~=3.0 to ~=3.5 for latest features and fixes. * fix(tests): Remove unused prepare_simulation call and import
1 parent d698cfe commit 5003cc1

4 files changed

Lines changed: 2937 additions & 2087 deletions

File tree

nicegui_tabulator/core/tabulator.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,14 @@ export default {
6262
template: `<div></div>`,
6363
props: {
6464
options: Object,
65-
resource_path: String,
65+
resourcePath: String,
6666
},
6767
async mounted() {
6868
await new Promise((resolve) => setTimeout(resolve, 0)); // NOTE: wait for window.path_prefix to be set
6969
const hasNiceGuiTabulatorTheme = document.querySelector('link.nicegui-tabulator-theme') !== null;
7070
if (!hasNiceGuiTabulatorTheme) {
7171
await Promise.all([
72-
loadResource(window.path_prefix + `${this.resource_path}/tabulator.min.css`),
72+
loadResource(window.path_prefix + `${this.resourcePath}/tabulator.min.css`),
7373
]);
7474
}
7575

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ authors = [
1111
requires-python = ">=3.9"
1212

1313
dependencies = [
14-
"nicegui~=3.0",
14+
"nicegui~=3.5",
1515
]
1616

1717
[dependency-groups]

tests/screen.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import os
33
from playwright.sync_api import Browser
44
from nicegui import ui, app
5-
from nicegui.testing.general_fixtures import prepare_simulation
65
from nicegui.server import Server
76

87
PORT = 3392
@@ -28,7 +27,6 @@ def __init__(self, browser: Browser) -> None:
2827

2928
def start_server(self) -> None:
3029
"""Start the webserver in a separate thread. This is the equivalent of `ui.run()` in a normal script."""
31-
prepare_simulation()
3230
self.server_thread = threading.Thread(
3331
target=lambda: ui.run(**self.ui_run_kwargs)
3432
)

0 commit comments

Comments
 (0)