Skip to content

Commit

Permalink
Put code for CSS class back
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricvlt committed Oct 27, 2024
1 parent e44abe8 commit 1c8b937
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion streamlit_condition_tree/frontend/src/ConditionTree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,10 @@ class ConditionTree extends StreamlitComponentBase<State> {
}

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

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

0 comments on commit 1c8b937

Please sign in to comment.