datavane / datavines

Know your data better!Datavines is Next-gen Data Observability Platform, support metadata manage and data quality.
https://datavane.github.io/datavines-website/
Apache License 2.0
410 stars 139 forks source link

[Bug] [UI] ui package error Types of parameters 'value' and 'value' are incompatible. #398

Closed xxzuo closed 3 months ago

xxzuo commented 3 months ago

Search before asking

What happened

UI package error

[INFO] ERROR in ./src/view/Main/HomeDetail/Dashboard/index.tsx:509:75
[INFO] TS2322: Type '(value: (string | number)[]) => Promise<void>' is not assignable to type '(value: (string | number | null)[], selectOptions: Option[]) => void'.
[INFO]   Types of parameters 'value' and 'value' are incompatible.
[INFO]     Type '(string | number | null)[]' is not assignable to type '(string | number)[]'.
[INFO]       Type 'string | number | null' is not assignable to type 'string | number'.
[INFO]         Type 'null' is not assignable to type 'string | number'.
[INFO]     507 |                 <Row style = {{marginTop: '20px'}}>
[INFO]     508 |                     <Col span={24}>
[INFO]   > 509 |                         <Cascader options={databases} loadData={loadData} onChange={onEntitySelectChange} changeOnSelect style = {{width:500}}/>
[INFO]         |                                                                           ^^^^^^^^
[INFO]     510 |                         <Select
[INFO]     511 |                             onChange={onMetricSelectChange}
[INFO]     512 |                             style = {{marginLeft: '20px', width: 200}}
[INFO]
[INFO] webpack 5.91.0 compiled with 1 error in 41391 ms
[INFO] ------------------------------------------------------------------------

DataVines Version

dev

DataVines Config

nothing

Running Command

mvn clean package -Prelease -DskipTests

Error Exception

[INFO] ERROR in ./src/view/Main/HomeDetail/Dashboard/index.tsx:509:75
[INFO] TS2322: Type '(value: (string | number)[]) => Promise<void>' is not assignable to type '(value: (string | number | null)[], selectOptions: Option[]) => void'.
[INFO]   Types of parameters 'value' and 'value' are incompatible.
[INFO]     Type '(string | number | null)[]' is not assignable to type '(string | number)[]'.
[INFO]       Type 'string | number | null' is not assignable to type 'string | number'.
[INFO]         Type 'null' is not assignable to type 'string | number'.
[INFO]     507 |                 <Row style = {{marginTop: '20px'}}>
[INFO]     508 |                     <Col span={24}>
[INFO]   > 509 |                         <Cascader options={databases} loadData={loadData} onChange={onEntitySelectChange} changeOnSelect style = {{width:500}}/>
[INFO]         |                                                                           ^^^^^^^^
[INFO]     510 |                         <Select
[INFO]     511 |                             onChange={onMetricSelectChange}
[INFO]     512 |                             style = {{marginLeft: '20px', width: 200}}
[INFO]
[INFO] webpack 5.91.0 compiled with 1 error in 41391 ms
[INFO] ------------------------------------------------------------------------

Engine Type

No response

Java Version

No response

Screenshots

No response

Are you willing to submit PR?