[RuleBuilderEditor] - Dynamic input type based on selected operand for rule value input #3765
Open
2 tasks done
Labels
status: needs priority 📥
Enhancements without a `val #` label
status: needs triage 🔍
type: enhancement 💡
New feature or request
What package is this for?
We think it's an overall improvement, but React is our target package.
Summary
Currently, the
RuleBuilderEditor
component allows users to define rules by selecting a column or an operand and setting a rule value. However, the component only supports a single input type for each column, which limits its flexibility.This feature request proposes to enhance the Rule Builder component by allowing dynamic input types based on the selected operand. This would enable users to have different input types for a single column, depending on the chosen operand.
For example, when a user selects the "Created at" column and the "Before" operand, the component should display a single
Date Input
for the rule value. However, if the user chooses the "In Between" operand for the "Created at" column, the component should display aDate Range
input instead. This added flexibility would improve the user experience and enable more complex rule configurations.We acknowledge that the Rule Builder columns can be overridden, but we have not found a way to make the
renderField()
function, which is responsible for rendering the Rule Value input, dynamic and dependent on the selected operands. Implementing this feature would allow therenderField()
function to adapt to the chosen operand and offer a more tailored input type for the rule value, further enhancing the component's usability.Specific timeline issues/requests
We want to use the
RuleBuilderEditor
component in a project that will start in Q2 2023, so we need a solution for this soon. We would appreciate it if you could help with it.Available extra resources
You can contact me on IBM Slack for details or any other information.
The text was updated successfully, but these errors were encountered: