Skip to content

Commit 1c8b937

Browse files
committed
Put code for CSS class back
1 parent e44abe8 commit 1c8b937

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

streamlit_condition_tree/frontend/src/ConditionTree.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,10 @@ class ConditionTree extends StreamlitComponentBase<State> {
138138
}
139139

140140
componentDidUpdate = () => {
141-
// ... (existing code for CSS class)
141+
// Class to apply custom css on rule_groups with a single child
142+
document
143+
.querySelectorAll('.rule_group>.group--children:has(> :nth-child(1):last-child)')
144+
.forEach((x) => x.classList.add('single-child'))
142145

143146
// Check if the tree has changed
144147
const currentTree = QbUtils.getTree(this.state.tree)

0 commit comments

Comments
 (0)