Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricvlt committed Jul 18, 2024
1 parent cf6f861 commit ef73c6d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
15 changes: 5 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ This component allows users to build complex condition trees that can be used to
- RHS can be:
- values
- another fields (of same type)
- ~~functions (arguments also can be values/fields/funcs)~~ (not implemented yet)
- LHS can be field ~~or function~~
- functions (arguments also can be values/fields/funcs)
- LHS can be field or function
- Reordering (drag-n-drop) support for rules and groups of rules
- Export to MongoDb, SQL, JsonLogic, SpEL or ElasticSearch

Expand Down Expand Up @@ -74,7 +74,7 @@ config = {
'label': 'Name',
'type': 'text',
},
'qty': {
'age': {
'label': 'Age',
'type': 'number',
'fieldSettings': {
Expand Down Expand Up @@ -119,9 +119,8 @@ def condition_tree(

A basic configuration can be built from a DataFrame with `config_from_dataframe`.
For a more advanced configuration, see the component [doc](https://github.com/ukrbublik/react-awesome-query-builder/blob/master/CONFIG.adoc)
and [demo](https://ukrbublik.github.io/react-awesome-query-builder/).
*Note*: Javascript functions (ex: validators) are not yet supported.

and [demo](https://ukrbublik.github.io/react-awesome-query-builder/).
Custom javascript functions must be wrapped into the JsCode class (see [Advanced config](https://condition-tree-demo.streamlit.app/Advanced_config))

- **return_type**: Format of the returned value :
- queryString
Expand Down Expand Up @@ -164,7 +163,3 @@ Can also be used to access the generated condition tree (see section below).

When a key is defined for the component, the condition tree generated is accessible through `st.session_state[key]` as a dictionary.
It can be loaded as an input tree through the `tree` parameter.


## Potential future improvements
- **Javascript support**: allow injection of javascript code in the configuration (e.g. validators)
1 change: 0 additions & 1 deletion streamlit_condition_tree/frontend/src/ConditionTree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ class ConditionTree extends StreamlitComponentBase<State> {

const config: Config = _.merge({}, defaultConfig, userConfig);


// Load input tree
let tree: ImmutableTree = QbUtils.loadTree(defaultTree)
if (props.args['tree'] != null) {
Expand Down

0 comments on commit ef73c6d

Please sign in to comment.