Can we rename the outer +rule group button as it is and the nested +rule group button as "+nested rule group" #636
Unanswered
kuljeet2604
asked this question in
Q&A
Replies: 2 comments 1 reply
-
Without thinking too much about it, I think the easiest way to do this would be a custom component. Something like this: import {
type ActionWithRulesAndAddersProps,
ActionElement,
QueryBuilder,
} from 'react-querybuilder';
const CustomAddGroup = (props: ActionWithRulesAndAddersProps) => {
if (props.level === 0) {
return <ActionElement {...props} />;
}
return <ActionElement {...props} label="+ Nested Group" />;
};
const App = () => (
<QueryBuilder controlElements={{ addGroupAction: CustomAddGroup }} />
); |
Beta Was this translation helpful? Give feedback.
0 replies
-
above solution worked for changing lable suppose if i want to make a custom component (for both add rule and add group), can this be done? my custom component for both action will have a button, and a small tooltip(for user guidance, as what that particular button does). |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Can we rename the outer +rule group button as it is and the nested +rule group button as "+nested rule group", in order to have the segregation of outer and inner level nesting.
Basically label will be changed.
Beta Was this translation helpful? Give feedback.
All reactions