You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/03/09 14:10:07 UTC
[GitHub] [superset] diegomedina248 opened a new pull request #19076: fix: allow to select in a native filter single mode
diegomedina248 opened a new pull request #19076:
URL: https://github.com/apache/superset/pull/19076
### SUMMARY
The native filter used in the Dashboard filters <NULL> values in single mode, which is a valid state.
The filter needs to be made only on `undefined` specifically.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Fix demo:
https://user-images.githubusercontent.com/17252075/157457995-84d8242e-d3ef-4515-ba4b-4ff85e5daca7.mov
### TESTING INSTRUCTIONS
1. go to FCC survey dashboard
2. create value filter for bootcamp name
3. unselect ' Can select multiple values'
4. Select <'NULL'> in the bootcamp name
### ADDITIONAL INFORMATION
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] michael-s-molina removed a comment on pull request #19076: fix: allow to select in a native filter single mode
Posted by GitBox <gi...@apache.org>.
michael-s-molina removed a comment on pull request #19076:
URL: https://github.com/apache/superset/pull/19076#issuecomment-1067965602
You can also use the Select prop `labelInValue` to work with the `{ label: <label>, value: <value> }` structure, which is required for `null` values like `{ label: NULL_STRING, value: null }`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] diegomedina248 commented on a change in pull request #19076: fix: allow to select in a native filter single mode
Posted by GitBox <gi...@apache.org>.
diegomedina248 commented on a change in pull request #19076:
URL: https://github.com/apache/superset/pull/19076#discussion_r826947741
##########
File path: superset-frontend/src/components/Select/utils.ts
##########
@@ -61,7 +61,7 @@ export function findValue<OptionType extends OptionTypeBase>(
}
export function getValue(option: string | number | { value: string | number }) {
- return typeof option === 'object' ? option.value : option;
+ return option && typeof option === 'object' ? option.value : option;
Review comment:
`typeof option === 'object'` returns true when the value is `null`, that's why the change.
Repl.it: https://replit.com/@DiegoMedina6/BaggyGratefulAdware#index.js
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov[bot] edited a comment on pull request #19076: fix: allow to select in a native filter single mode
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #19076:
URL: https://github.com/apache/superset/pull/19076#issuecomment-1063113925
# [Codecov](https://codecov.io/gh/apache/superset/pull/19076?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#19076](https://codecov.io/gh/apache/superset/pull/19076?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (cfd08db) into [master](https://codecov.io/gh/apache/superset/commit/8d53db1db6c3211d6be6905bd1e4cd11043e8219?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8d53db1) will **decrease** coverage by `0.03%`.
> The diff coverage is `50.00%`.
> :exclamation: Current head cfd08db differs from pull request most recent head d796c65. Consider uploading reports for the commit d796c65 to get more accurate results
```diff
@@ Coverage Diff @@
## master #19076 +/- ##
==========================================
- Coverage 66.54% 66.51% -0.04%
==========================================
Files 1646 1643 -3
Lines 63630 63458 -172
Branches 6475 6450 -25
==========================================
- Hits 42343 42206 -137
+ Misses 19607 19581 -26
+ Partials 1680 1671 -9
```
| Flag | Coverage Δ | |
|---|---|---|
| javascript | `51.25% <50.00%> (-0.05%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/19076?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...c/filters/components/Select/SelectFilterPlugin.tsx](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9TZWxlY3QvU2VsZWN0RmlsdGVyUGx1Z2luLnRzeA==) | `67.10% <0.00%> (+1.31%)` | :arrow_up: |
| [...et-frontend/src/filters/components/Select/types.ts](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9TZWxlY3QvdHlwZXMudHM=) | `100.00% <ø> (ø)` | |
| [superset-frontend/src/components/Select/utils.ts](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvU2VsZWN0L3V0aWxzLnRz) | `52.94% <100.00%> (ø)` | |
| [...ntend/src/SqlLab/components/QueryHistory/index.tsx](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9jb21wb25lbnRzL1F1ZXJ5SGlzdG9yeS9pbmRleC50c3g=) | `50.00% <0.00%> (-16.67%)` | :arrow_down: |
| [...d/src/SqlLab/components/AceEditorWrapper/index.tsx](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9jb21wb25lbnRzL0FjZUVkaXRvcldyYXBwZXIvaW5kZXgudHN4) | `43.85% <0.00%> (-9.72%)` | :arrow_down: |
| [...et-frontend/src/components/Chart/ChartRenderer.jsx](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvQ2hhcnQvQ2hhcnRSZW5kZXJlci5qc3g=) | `44.89% <0.00%> (-7.74%)` | :arrow_down: |
| [...erset-frontend/src/components/EmptyState/index.tsx](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvRW1wdHlTdGF0ZS9pbmRleC50c3g=) | `61.53% <0.00%> (-7.70%)` | :arrow_down: |
| [...components/DashboardBuilder/DashboardContainer.tsx](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0Rhc2hib2FyZEJ1aWxkZXIvRGFzaGJvYXJkQ29udGFpbmVyLnRzeA==) | `68.57% <0.00%> (-5.12%)` | :arrow_down: |
| [...gins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcHJlc2V0LWNoYXJ0LW52ZDMvc3JjL05WRDNDb250cm9scy50c3g=) | `95.83% <0.00%> (-4.17%)` | :arrow_down: |
| [superset/databases/commands/create.py](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL2NyZWF0ZS5weQ==) | `88.23% <0.00%> (-3.93%)` | :arrow_down: |
| ... and [67 more](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/19076?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/19076?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [8d53db1...d796c65](https://codecov.io/gh/apache/superset/pull/19076?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] michael-s-molina commented on a change in pull request #19076: fix: allow to select in a native filter single mode
Posted by GitBox <gi...@apache.org>.
michael-s-molina commented on a change in pull request #19076:
URL: https://github.com/apache/superset/pull/19076#discussion_r827021205
##########
File path: superset-frontend/src/components/Select/utils.ts
##########
@@ -61,7 +61,7 @@ export function findValue<OptionType extends OptionTypeBase>(
}
export function getValue(option: string | number | { value: string | number }) {
- return typeof option === 'object' ? option.value : option;
+ return option && typeof option === 'object' ? option.value : option;
Review comment:
@diegomedina248 Please disregard my previous message. To support Ant Design's different behavior depending on whether `labelInValue` is active, we need to also account for an option being `null`. You can keep your last commit where `getValue(option: string | number | { value: string | number | null } | null`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov[bot] commented on pull request #19076: fix: allow to select in a native filter single mode
Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on pull request #19076:
URL: https://github.com/apache/superset/pull/19076#issuecomment-1063113925
# [Codecov](https://codecov.io/gh/apache/superset/pull/19076?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#19076](https://codecov.io/gh/apache/superset/pull/19076?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (cfd08db) into [master](https://codecov.io/gh/apache/superset/commit/f9c7405e0eacf69b79063c441aa66d74c8fa3f91?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f9c7405) will **increase** coverage by `0.00%`.
> The diff coverage is `50.00%`.
[](https://codecov.io/gh/apache/superset/pull/19076?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #19076 +/- ##
=======================================
Coverage 66.50% 66.51%
=======================================
Files 1642 1643 +1
Lines 63442 63458 +16
Branches 6439 6450 +11
=======================================
+ Hits 42191 42206 +15
+ Misses 19582 19581 -1
- Partials 1669 1671 +2
```
| Flag | Coverage Δ | |
|---|---|---|
| javascript | `51.25% <50.00%> (+0.02%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/19076?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...c/filters/components/Select/SelectFilterPlugin.tsx](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9TZWxlY3QvU2VsZWN0RmlsdGVyUGx1Z2luLnRzeA==) | `67.10% <0.00%> (+1.31%)` | :arrow_up: |
| [...et-frontend/src/filters/components/Select/types.ts](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9TZWxlY3QvdHlwZXMudHM=) | `100.00% <ø> (ø)` | |
| [superset-frontend/src/components/Select/utils.ts](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvU2VsZWN0L3V0aWxzLnRz) | `52.94% <100.00%> (ø)` | |
| [...frontend/src/SqlLab/components/SqlEditor/index.jsx](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9jb21wb25lbnRzL1NxbEVkaXRvci9pbmRleC5qc3g=) | `50.84% <0.00%> (-0.60%)` | :arrow_down: |
| [superset-frontend/src/views/CRUD/hooks.ts](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvaG9va3MudHM=) | `47.15% <0.00%> (ø)` | |
| [...perset-frontend/src/addSlice/AddSliceContainer.tsx](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2FkZFNsaWNlL0FkZFNsaWNlQ29udGFpbmVyLnRzeA==) | `61.76% <0.00%> (ø)` | |
| [...rontend/src/visualizations/TimeTable/TimeTable.jsx](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3Zpc3VhbGl6YXRpb25zL1RpbWVUYWJsZS9UaW1lVGFibGUuanN4) | `0.00% <0.00%> (ø)` | |
| [superset-frontend/src/utils/sortNumericValues.ts](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3V0aWxzL3NvcnROdW1lcmljVmFsdWVzLnRz) | `100.00% <0.00%> (ø)` | |
| [superset-frontend/src/components/Select/Select.tsx](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvU2VsZWN0L1NlbGVjdC50c3g=) | `86.14% <0.00%> (+0.92%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/19076?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/19076?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [f9c7405...cfd08db](https://codecov.io/gh/apache/superset/pull/19076?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] ktmud commented on a change in pull request #19076: fix: allow to select in a native filter single mode
Posted by GitBox <gi...@apache.org>.
ktmud commented on a change in pull request #19076:
URL: https://github.com/apache/superset/pull/19076#discussion_r823796724
##########
File path: superset-frontend/src/components/Select/utils.ts
##########
@@ -61,7 +61,7 @@ export function findValue<OptionType extends OptionTypeBase>(
}
export function getValue(option: string | number | { value: string | number }) {
- return typeof option === 'object' ? option.value : option;
+ return option && typeof option === 'object' ? option.value : option;
Review comment:
If we are allowing `option` to be `null` then we need to update the signature of `getValue` as well (add `| null`).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] michael-s-molina commented on pull request #19076: fix: allow to select in a native filter single mode
Posted by GitBox <gi...@apache.org>.
michael-s-molina commented on pull request #19076:
URL: https://github.com/apache/superset/pull/19076#issuecomment-1063910197
> @michael-s-molina @geido could one of you approve this as codeowners?
@rusackas Before approving this PR we need to discuss how are we going to deal with `null` values in the Select component. Right now, Select values don't accept a `null` value as you can see by checking Typescript constraints.
```
export function getValue(option: string | number | { value: string | number }) {
- return typeof option === 'object' ? option.value : option;
+ return option && typeof option === 'object' ? option.value : option;
}
```
This change, for instance, shouldn't be valid because `option` can only be a `string`, `number` or `object`. The problem is that in `FilterSelectPlugin` we have:
```
<Select
// @ts-ignore
options={options}
>
```
I already talked to @geido about this we will schedule a meeting to discuss the best approach.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] michael-s-molina merged pull request #19076: fix: allow to select in a native filter single mode
Posted by GitBox <gi...@apache.org>.
michael-s-molina merged pull request #19076:
URL: https://github.com/apache/superset/pull/19076
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov[bot] edited a comment on pull request #19076: fix: allow to select in a native filter single mode
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #19076:
URL: https://github.com/apache/superset/pull/19076#issuecomment-1063113925
# [Codecov](https://codecov.io/gh/apache/superset/pull/19076?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#19076](https://codecov.io/gh/apache/superset/pull/19076?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (cfd08db) into [master](https://codecov.io/gh/apache/superset/commit/f9c7405e0eacf69b79063c441aa66d74c8fa3f91?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f9c7405) will **increase** coverage by `0.00%`.
> The diff coverage is `50.00%`.
> :exclamation: Current head cfd08db differs from pull request most recent head 8546d83. Consider uploading reports for the commit 8546d83 to get more accurate results
[](https://codecov.io/gh/apache/superset/pull/19076?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #19076 +/- ##
=======================================
Coverage 66.50% 66.51%
=======================================
Files 1642 1643 +1
Lines 63442 63458 +16
Branches 6439 6450 +11
=======================================
+ Hits 42191 42206 +15
+ Misses 19582 19581 -1
- Partials 1669 1671 +2
```
| Flag | Coverage Δ | |
|---|---|---|
| javascript | `51.25% <50.00%> (+0.02%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/19076?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...c/filters/components/Select/SelectFilterPlugin.tsx](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9TZWxlY3QvU2VsZWN0RmlsdGVyUGx1Z2luLnRzeA==) | `67.10% <0.00%> (+1.31%)` | :arrow_up: |
| [...et-frontend/src/filters/components/Select/types.ts](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9TZWxlY3QvdHlwZXMudHM=) | `100.00% <ø> (ø)` | |
| [superset-frontend/src/components/Select/utils.ts](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvU2VsZWN0L3V0aWxzLnRz) | `52.94% <100.00%> (ø)` | |
| [...frontend/src/SqlLab/components/SqlEditor/index.jsx](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9jb21wb25lbnRzL1NxbEVkaXRvci9pbmRleC5qc3g=) | `50.84% <0.00%> (-0.60%)` | :arrow_down: |
| [superset-frontend/src/views/CRUD/hooks.ts](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvaG9va3MudHM=) | `47.15% <0.00%> (ø)` | |
| [...perset-frontend/src/addSlice/AddSliceContainer.tsx](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2FkZFNsaWNlL0FkZFNsaWNlQ29udGFpbmVyLnRzeA==) | `61.76% <0.00%> (ø)` | |
| [...rontend/src/visualizations/TimeTable/TimeTable.jsx](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3Zpc3VhbGl6YXRpb25zL1RpbWVUYWJsZS9UaW1lVGFibGUuanN4) | `0.00% <0.00%> (ø)` | |
| [superset-frontend/src/utils/sortNumericValues.ts](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3V0aWxzL3NvcnROdW1lcmljVmFsdWVzLnRz) | `100.00% <0.00%> (ø)` | |
| [superset-frontend/src/components/Select/Select.tsx](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvU2VsZWN0L1NlbGVjdC50c3g=) | `86.14% <0.00%> (+0.92%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/19076?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/19076?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [f9c7405...8546d83](https://codecov.io/gh/apache/superset/pull/19076?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] michael-s-molina commented on a change in pull request #19076: fix: allow to select in a native filter single mode
Posted by GitBox <gi...@apache.org>.
michael-s-molina commented on a change in pull request #19076:
URL: https://github.com/apache/superset/pull/19076#discussion_r826934994
##########
File path: superset-frontend/src/components/Select/utils.ts
##########
@@ -61,7 +61,7 @@ export function findValue<OptionType extends OptionTypeBase>(
}
export function getValue(option: string | number | { value: string | number }) {
Review comment:
```suggestion
export function getValue(option: string | number | { value: string | number | null }) {
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov[bot] edited a comment on pull request #19076: fix: allow to select in a native filter single mode
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #19076:
URL: https://github.com/apache/superset/pull/19076#issuecomment-1063113925
# [Codecov](https://codecov.io/gh/apache/superset/pull/19076?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#19076](https://codecov.io/gh/apache/superset/pull/19076?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (93480f9) into [master](https://codecov.io/gh/apache/superset/commit/8d53db1db6c3211d6be6905bd1e4cd11043e8219?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8d53db1) will **decrease** coverage by `0.00%`.
> The diff coverage is `50.00%`.
> :exclamation: Current head 93480f9 differs from pull request most recent head d796c65. Consider uploading reports for the commit d796c65 to get more accurate results
```diff
@@ Coverage Diff @@
## master #19076 +/- ##
==========================================
- Coverage 66.54% 66.54% -0.01%
==========================================
Files 1646 1646
Lines 63630 63630
Branches 6475 6476 +1
==========================================
- Hits 42343 42342 -1
Misses 19607 19607
- Partials 1680 1681 +1
```
| Flag | Coverage Δ | |
|---|---|---|
| javascript | `51.29% <50.00%> (-0.01%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/19076?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...c/filters/components/Select/SelectFilterPlugin.tsx](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9TZWxlY3QvU2VsZWN0RmlsdGVyUGx1Z2luLnRzeA==) | `64.47% <0.00%> (-1.32%)` | :arrow_down: |
| [...et-frontend/src/filters/components/Select/types.ts](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9TZWxlY3QvdHlwZXMudHM=) | `100.00% <ø> (ø)` | |
| [superset-frontend/src/components/Select/utils.ts](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvU2VsZWN0L3V0aWxzLnRz) | `52.94% <100.00%> (ø)` | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/19076?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/19076?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [8d53db1...d796c65](https://codecov.io/gh/apache/superset/pull/19076?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] michael-s-molina commented on a change in pull request #19076: fix: allow to select in a native filter single mode
Posted by GitBox <gi...@apache.org>.
michael-s-molina commented on a change in pull request #19076:
URL: https://github.com/apache/superset/pull/19076#discussion_r827007787
##########
File path: superset-frontend/src/components/Select/utils.ts
##########
@@ -61,7 +61,7 @@ export function findValue<OptionType extends OptionTypeBase>(
}
export function getValue(option: string | number | { value: string | number }) {
- return typeof option === 'object' ? option.value : option;
+ return option && typeof option === 'object' ? option.value : option;
Review comment:
@diegomedina248 This is happening because the `SelectFilterPlugin` is configured incorrectly. By default, if `options` is a function (async) then `labelInValue` is `true` otherwise is `false`. The `SelectFilterPlugin` is passing a static array of options in the form of `{ label: <label>, value: <value> }` but it's not setting the `labelInValue` to `true`. If you set it to `true`, you will receive the object in the change event. Please make sure to review other parts of the code after changing the `labelInValue` property (like `value`).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] michael-s-molina commented on a change in pull request #19076: fix: allow to select in a native filter single mode
Posted by GitBox <gi...@apache.org>.
michael-s-molina commented on a change in pull request #19076:
URL: https://github.com/apache/superset/pull/19076#discussion_r826948801
##########
File path: superset-frontend/src/components/Select/utils.ts
##########
@@ -61,7 +61,7 @@ export function findValue<OptionType extends OptionTypeBase>(
}
export function getValue(option: string | number | { value: string | number }) {
- return typeof option === 'object' ? option.value : option;
+ return option && typeof option === 'object' ? option.value : option;
Review comment:
The option shouldn't be `null` because we need a label to describe the `null` value. The value of an object option is `null`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] michael-s-molina commented on pull request #19076: fix: allow to select in a native filter single mode
Posted by GitBox <gi...@apache.org>.
michael-s-molina commented on pull request #19076:
URL: https://github.com/apache/superset/pull/19076#issuecomment-1067965602
You can also use the Select prop `labelInValue` to work with the `{ label: <label>, value: <value> }` structure, which is required for `null` values like `{ label: NULL_STRING, value: null }`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] michael-s-molina commented on a change in pull request #19076: fix: allow to select in a native filter single mode
Posted by GitBox <gi...@apache.org>.
michael-s-molina commented on a change in pull request #19076:
URL: https://github.com/apache/superset/pull/19076#discussion_r826948801
##########
File path: superset-frontend/src/components/Select/utils.ts
##########
@@ -61,7 +61,7 @@ export function findValue<OptionType extends OptionTypeBase>(
}
export function getValue(option: string | number | { value: string | number }) {
- return typeof option === 'object' ? option.value : option;
+ return option && typeof option === 'object' ? option.value : option;
Review comment:
The option shouldn't be `null`. The value of an object option is `null`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] michael-s-molina commented on pull request #19076: fix: allow to select in a native filter single mode
Posted by GitBox <gi...@apache.org>.
michael-s-molina commented on pull request #19076:
URL: https://github.com/apache/superset/pull/19076#issuecomment-1067955225
@diegomedina248 We discussed `null` values and we're already supporting it in the `Select`, so you just need to apply the suggestions to `getValue` and we're good to go.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] diegomedina248 commented on a change in pull request #19076: fix: allow to select in a native filter single mode
Posted by GitBox <gi...@apache.org>.
diegomedina248 commented on a change in pull request #19076:
URL: https://github.com/apache/superset/pull/19076#discussion_r826982011
##########
File path: superset-frontend/src/components/Select/utils.ts
##########
@@ -61,7 +61,7 @@ export function findValue<OptionType extends OptionTypeBase>(
}
export function getValue(option: string | number | { value: string | number }) {
- return typeof option === 'object' ? option.value : option;
+ return option && typeof option === 'object' ? option.value : option;
Review comment:
The `getValue` is called with the `selectValue` in which we store the value itself, not the option (for multi select, an array of the values)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] michael-s-molina commented on a change in pull request #19076: fix: allow to select in a native filter single mode
Posted by GitBox <gi...@apache.org>.
michael-s-molina commented on a change in pull request #19076:
URL: https://github.com/apache/superset/pull/19076#discussion_r827021205
##########
File path: superset-frontend/src/components/Select/utils.ts
##########
@@ -61,7 +61,7 @@ export function findValue<OptionType extends OptionTypeBase>(
}
export function getValue(option: string | number | { value: string | number }) {
- return typeof option === 'object' ? option.value : option;
+ return option && typeof option === 'object' ? option.value : option;
Review comment:
@diegomedina248 Please disregard my previous message. To support Ant Design's different behavior depending on whether `labelInValue` is active, we need to also account for an option being a primary type. You can keep your last commit where `getValue(option: string | number | { value: string | number | null } | null`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov[bot] edited a comment on pull request #19076: fix: allow to select in a native filter single mode
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #19076:
URL: https://github.com/apache/superset/pull/19076#issuecomment-1063113925
# [Codecov](https://codecov.io/gh/apache/superset/pull/19076?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#19076](https://codecov.io/gh/apache/superset/pull/19076?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (cfd08db) into [master](https://codecov.io/gh/apache/superset/commit/981f09b5db77fc2348a508da49cdddf1fcfcb3c6?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (981f09b) will **decrease** coverage by `0.04%`.
> The diff coverage is `50.00%`.
> :exclamation: Current head cfd08db differs from pull request most recent head 7a324df. Consider uploading reports for the commit 7a324df to get more accurate results
```diff
@@ Coverage Diff @@
## master #19076 +/- ##
==========================================
- Coverage 66.55% 66.51% -0.05%
==========================================
Files 1646 1643 -3
Lines 63617 63458 -159
Branches 6471 6450 -21
==========================================
- Hits 42340 42206 -134
+ Misses 19599 19581 -18
+ Partials 1678 1671 -7
```
| Flag | Coverage Δ | |
|---|---|---|
| javascript | `51.25% <50.00%> (-0.02%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/19076?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...c/filters/components/Select/SelectFilterPlugin.tsx](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9TZWxlY3QvU2VsZWN0RmlsdGVyUGx1Z2luLnRzeA==) | `67.10% <0.00%> (+1.31%)` | :arrow_up: |
| [...et-frontend/src/filters/components/Select/types.ts](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9TZWxlY3QvdHlwZXMudHM=) | `100.00% <ø> (ø)` | |
| [superset-frontend/src/components/Select/utils.ts](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvU2VsZWN0L3V0aWxzLnRz) | `52.94% <100.00%> (ø)` | |
| [...d/src/SqlLab/components/AceEditorWrapper/index.tsx](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9jb21wb25lbnRzL0FjZUVkaXRvcldyYXBwZXIvaW5kZXgudHN4) | `43.85% <0.00%> (-9.72%)` | :arrow_down: |
| [...et-frontend/src/components/Chart/ChartRenderer.jsx](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvQ2hhcnQvQ2hhcnRSZW5kZXJlci5qc3g=) | `44.89% <0.00%> (-7.74%)` | :arrow_down: |
| [...components/DashboardBuilder/DashboardContainer.tsx](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0Rhc2hib2FyZEJ1aWxkZXIvRGFzaGJvYXJkQ29udGFpbmVyLnRzeA==) | `68.57% <0.00%> (-5.12%)` | :arrow_down: |
| [...gins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9sZWdhY3ktcHJlc2V0LWNoYXJ0LW52ZDMvc3JjL05WRDNDb250cm9scy50c3g=) | `95.83% <0.00%> (-4.17%)` | :arrow_down: |
| [superset/databases/commands/create.py](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGF0YWJhc2VzL2NvbW1hbmRzL2NyZWF0ZS5weQ==) | `88.23% <0.00%> (-3.93%)` | :arrow_down: |
| [...veFilters/FilterBar/FilterControls/FilterValue.tsx](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL25hdGl2ZUZpbHRlcnMvRmlsdGVyQmFyL0ZpbHRlckNvbnRyb2xzL0ZpbHRlclZhbHVlLnRzeA==) | `56.97% <0.00%> (-3.47%)` | :arrow_down: |
| [.../src/explore/components/ControlPanelsContainer.tsx](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9Db250cm9sUGFuZWxzQ29udGFpbmVyLnRzeA==) | `77.65% <0.00%> (-2.14%)` | :arrow_down: |
| ... and [51 more](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/19076?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/19076?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [981f09b...7a324df](https://codecov.io/gh/apache/superset/pull/19076?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] michael-s-molina commented on a change in pull request #19076: fix: allow to select in a native filter single mode
Posted by GitBox <gi...@apache.org>.
michael-s-molina commented on a change in pull request #19076:
URL: https://github.com/apache/superset/pull/19076#discussion_r826943381
##########
File path: superset-frontend/src/components/Select/utils.ts
##########
@@ -61,7 +61,7 @@ export function findValue<OptionType extends OptionTypeBase>(
}
export function getValue(option: string | number | { value: string | number }) {
- return typeof option === 'object' ? option.value : option;
+ return option && typeof option === 'object' ? option.value : option;
Review comment:
```suggestion
return typeof option === 'object' ? option.value : option;
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] michael-s-molina commented on a change in pull request #19076: fix: allow to select in a native filter single mode
Posted by GitBox <gi...@apache.org>.
michael-s-molina commented on a change in pull request #19076:
URL: https://github.com/apache/superset/pull/19076#discussion_r826948801
##########
File path: superset-frontend/src/components/Select/utils.ts
##########
@@ -61,7 +61,7 @@ export function findValue<OptionType extends OptionTypeBase>(
}
export function getValue(option: string | number | { value: string | number }) {
- return typeof option === 'object' ? option.value : option;
+ return option && typeof option === 'object' ? option.value : option;
Review comment:
The option shouldn't be `null` because it requires a label. The value of an object option is `null`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] sadpandajoe commented on pull request #19076: fix: allow to select in a native filter single mode
Posted by GitBox <gi...@apache.org>.
sadpandajoe commented on pull request #19076:
URL: https://github.com/apache/superset/pull/19076#issuecomment-1072727918
🏷️ preset:2022.11
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] diegomedina248 commented on pull request #19076: fix: allow to select in a native filter single mode
Posted by GitBox <gi...@apache.org>.
diegomedina248 commented on pull request #19076:
URL: https://github.com/apache/superset/pull/19076#issuecomment-1064252581
@michael-s-molina @ktmud yeah, agreed.
Some other libraries store the selectedOptions instead of the value directly, so you will have: `{value: null, label: 'x'}` instead of plain `null`, which could lead to errors if treated like `undefined`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] rusackas commented on pull request #19076: fix: allow to select in a native filter single mode
Posted by GitBox <gi...@apache.org>.
rusackas commented on pull request #19076:
URL: https://github.com/apache/superset/pull/19076#issuecomment-1063396583
@michael-s-molina @geido could one of you approve this as codeowners?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] codecov[bot] edited a comment on pull request #19076: fix: allow to select in a native filter single mode
Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #19076:
URL: https://github.com/apache/superset/pull/19076#issuecomment-1063113925
# [Codecov](https://codecov.io/gh/apache/superset/pull/19076?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#19076](https://codecov.io/gh/apache/superset/pull/19076?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (cfd08db) into [master](https://codecov.io/gh/apache/superset/commit/f9c7405e0eacf69b79063c441aa66d74c8fa3f91?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f9c7405) will **increase** coverage by `0.00%`.
> The diff coverage is `50.00%`.
> :exclamation: Current head cfd08db differs from pull request most recent head de5fcd7. Consider uploading reports for the commit de5fcd7 to get more accurate results
[](https://codecov.io/gh/apache/superset/pull/19076?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #19076 +/- ##
=======================================
Coverage 66.50% 66.51%
=======================================
Files 1642 1643 +1
Lines 63442 63458 +16
Branches 6439 6450 +11
=======================================
+ Hits 42191 42206 +15
+ Misses 19582 19581 -1
- Partials 1669 1671 +2
```
| Flag | Coverage Δ | |
|---|---|---|
| javascript | `51.25% <50.00%> (+0.02%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/19076?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...c/filters/components/Select/SelectFilterPlugin.tsx](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9TZWxlY3QvU2VsZWN0RmlsdGVyUGx1Z2luLnRzeA==) | `67.10% <0.00%> (+1.31%)` | :arrow_up: |
| [...et-frontend/src/filters/components/Select/types.ts](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2ZpbHRlcnMvY29tcG9uZW50cy9TZWxlY3QvdHlwZXMudHM=) | `100.00% <ø> (ø)` | |
| [superset-frontend/src/components/Select/utils.ts](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvU2VsZWN0L3V0aWxzLnRz) | `52.94% <100.00%> (ø)` | |
| [...frontend/src/SqlLab/components/SqlEditor/index.jsx](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL1NxbExhYi9jb21wb25lbnRzL1NxbEVkaXRvci9pbmRleC5qc3g=) | `50.84% <0.00%> (-0.60%)` | :arrow_down: |
| [superset-frontend/src/views/CRUD/hooks.ts](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvaG9va3MudHM=) | `47.15% <0.00%> (ø)` | |
| [...perset-frontend/src/addSlice/AddSliceContainer.tsx](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2FkZFNsaWNlL0FkZFNsaWNlQ29udGFpbmVyLnRzeA==) | `61.76% <0.00%> (ø)` | |
| [...rontend/src/visualizations/TimeTable/TimeTable.jsx](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3Zpc3VhbGl6YXRpb25zL1RpbWVUYWJsZS9UaW1lVGFibGUuanN4) | `0.00% <0.00%> (ø)` | |
| [superset-frontend/src/utils/sortNumericValues.ts](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3V0aWxzL3NvcnROdW1lcmljVmFsdWVzLnRz) | `100.00% <0.00%> (ø)` | |
| [superset-frontend/src/components/Select/Select.tsx](https://codecov.io/gh/apache/superset/pull/19076/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvU2VsZWN0L1NlbGVjdC50c3g=) | `86.14% <0.00%> (+0.92%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/19076?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/19076?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [f9c7405...de5fcd7](https://codecov.io/gh/apache/superset/pull/19076?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] michael-s-molina commented on a change in pull request #19076: fix: allow to select in a native filter single mode
Posted by GitBox <gi...@apache.org>.
michael-s-molina commented on a change in pull request #19076:
URL: https://github.com/apache/superset/pull/19076#discussion_r827007787
##########
File path: superset-frontend/src/components/Select/utils.ts
##########
@@ -61,7 +61,7 @@ export function findValue<OptionType extends OptionTypeBase>(
}
export function getValue(option: string | number | { value: string | number }) {
- return typeof option === 'object' ? option.value : option;
+ return option && typeof option === 'object' ? option.value : option;
Review comment:
@diegomedina248 This is happening because the `SelectFilterPlugin` is configured incorrectly. By default, if `options` is a function (async) then `labelInValue` is `true` otherwise is `false`. The `SelectFilterPlugin` is passing a static array of options in the form of `{ label: <label>, value: <value> }` but it's not setting the `labelInValue` to `true`. If you set it to `true`, you will receive the object in the change event. Please make sure to review other parts of the code after changing the `labelInValue` property (like `value`).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] michael-s-molina commented on a change in pull request #19076: fix: allow to select in a native filter single mode
Posted by GitBox <gi...@apache.org>.
michael-s-molina commented on a change in pull request #19076:
URL: https://github.com/apache/superset/pull/19076#discussion_r827021205
##########
File path: superset-frontend/src/components/Select/utils.ts
##########
@@ -61,7 +61,7 @@ export function findValue<OptionType extends OptionTypeBase>(
}
export function getValue(option: string | number | { value: string | number }) {
- return typeof option === 'object' ? option.value : option;
+ return option && typeof option === 'object' ? option.value : option;
Review comment:
@diegomedina248 Please disregard my previous message. To support Ant Design's different behavior depending on whether `labelInValue` is active, we need to also account for an option being `null`. You can keep your last commit where `getValue(option: string | number | { value: string | number | null } | null)`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] michael-s-molina merged pull request #19076: fix: allow to select in a native filter single mode
Posted by GitBox <gi...@apache.org>.
michael-s-molina merged pull request #19076:
URL: https://github.com/apache/superset/pull/19076
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org