Comments (4)
Expression
is used to represent Syntax Tree Structure only, it does not have any idea about data type. It's up to user to use that expression (if we add datatype then it needs to handle wrong data input, which is not its job). For example with SimpleResultProcessing
, it combine options and expression to transform data as below:
var newData = new SimpleResultProcessing(this.options).process(data, expressions);
I think in your case, you just need to write a class to transform Expression
to your CustomExpression
with passed options
. (Expression has columnField, it should be easy to know which field is number
)
from react-filter-box.
Or maybe, an option converter
that is a function that can be used to translate the value from what the user typed into another type. I want to use this filter on a remote server, and I need to be able to translate the values before sending them.
const options = [
{
columnField: 'SourcePort',
type: 'text',
converter: parseInt
}
];
from react-filter-box.
I'd be willing to create a PR if you feel it is a worthy feature
from react-filter-box.
Thanks for the pointer; that works for me 👍 I wanted to avoid having to transform the expressions, but it makes sense that the syntax tree shouldn't care about datatypes
from react-filter-box.
Related Issues (20)
- Two inputs are rendered instead of one
- Issue with running with react 16 HOT 1
- Typo in column field name in Config
- Debugging logs being printed in Console HOT 2
- Distributed files include `eval()` which causes errors in some environments HOT 4
- Cannot find module './Expression' AND Cannot find module './ParsedError'
- How to change options prop dynamically after load HOT 1
- Converting from react-filter-box query to a sql query?
- Multiline view or wrap content when filter values are more
- how to use BETWEEN operator with two values separated by AND?
- Reverse the expression to query string
- Cannot able to modify the queries already in the filter box
- Can't load an initial expression HOT 1
- Ctrl+z doesn't work as expected
- Need to click on the box to load an initial query
- can you add an example with function components and hooks HOT 5
- Can I exclude brackets from auto suggestion ?
- Any number comparison available? HOT 1
- How do I clear the Input after the enter. No option to clear the search.?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-filter-box.