Commit c2da72b
### Motivation
If `ui.aggrid` was created in a page with dark mode, `ui.aggrid`'s theme
won't be dark mode unless resizing page.
<!-- What problem does this PR solve? Which new feature or improvement
does it implement? -->
<!-- Please provide relevant links to corresponding issues and feature
requests. -->
### Implementation
Add `this.$el.setAttribute("data-ag-theme-mode",
document.body.classList.contains("body--dark") ? "dark" : "light")` to
aggrid.js line 8.
Before themeObserver created, init the attribute `data-ag-theme-mode` of
`ui.aggrid`.
<!-- What is the concept behind the implementation? How does it work?
-->
<!-- Include any important technical decisions or trade-offs made -->
### Progress
- [x] I chose a meaningful title that completes the sentence: "If
applied, this PR will..."
- [x] The implementation is complete.
- [x] Pytests have been added (or are not necessary).
- [x] Documentation has been added (or is not necessary).
---------
Co-authored-by: Falko Schindler <[email protected]>
1 parent 3a94186 commit c2da72b
1 file changed
+4
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
0 commit comments