Skip to content

Commit ef73c6d

Browse files
committed
Update README
1 parent cf6f861 commit ef73c6d

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

README.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ This component allows users to build complex condition trees that can be used to
2626
- RHS can be:
2727
- values
2828
- another fields (of same type)
29-
- ~~functions (arguments also can be values/fields/funcs)~~ (not implemented yet)
30-
- LHS can be field ~~or function~~
29+
- functions (arguments also can be values/fields/funcs)
30+
- LHS can be field or function
3131
- Reordering (drag-n-drop) support for rules and groups of rules
3232
- Export to MongoDb, SQL, JsonLogic, SpEL or ElasticSearch
3333

@@ -74,7 +74,7 @@ config = {
7474
'label': 'Name',
7575
'type': 'text',
7676
},
77-
'qty': {
77+
'age': {
7878
'label': 'Age',
7979
'type': 'number',
8080
'fieldSettings': {
@@ -119,9 +119,8 @@ def condition_tree(
119119

120120
A basic configuration can be built from a DataFrame with `config_from_dataframe`.
121121
For a more advanced configuration, see the component [doc](https://github.com/ukrbublik/react-awesome-query-builder/blob/master/CONFIG.adoc)
122-
and [demo](https://ukrbublik.github.io/react-awesome-query-builder/).
123-
*Note*: Javascript functions (ex: validators) are not yet supported.
124-
122+
and [demo](https://ukrbublik.github.io/react-awesome-query-builder/).
123+
Custom javascript functions must be wrapped into the JsCode class (see [Advanced config](https://condition-tree-demo.streamlit.app/Advanced_config))
125124

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

165164
When a key is defined for the component, the condition tree generated is accessible through `st.session_state[key]` as a dictionary.
166165
It can be loaded as an input tree through the `tree` parameter.
167-
168-
169-
## Potential future improvements
170-
- **Javascript support**: allow injection of javascript code in the configuration (e.g. validators)

streamlit_condition_tree/frontend/src/ConditionTree.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ class ConditionTree extends StreamlitComponentBase<State> {
7979

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

82-
8382
// Load input tree
8483
let tree: ImmutableTree = QbUtils.loadTree(defaultTree)
8584
if (props.args['tree'] != null) {

0 commit comments

Comments
 (0)