-
Notifications
You must be signed in to change notification settings - Fork 62
Support base operations with selectors globality #3061
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Support base operations with selectors globality #3061
Conversation
fee0809 to
b820f31
Compare
|
|
|
📦 Statoscope quick diff with main-branch: ⏱ Build time: -2.5 sec (-4.46%) ⚖️ Initial size: 3.75 kb (0.09%) 🕵️ Validation errors: 0 Full Statoscope report could be found here |
|
src/shared/types/dash.ts
Outdated
| import type {TABS_SCOPE_ALL} from '../constants/dash'; | ||
| import type {Operations} from '../modules'; | ||
|
|
||
| export type TabsScope = typeof TABS_SCOPE_ALL | string | string[] | undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's split it to two props. One is for type, second is for ids
| const hasMultipleSelectors = group.length > 1; | ||
|
|
||
| switch (sourceType) { | ||
| case DashTabItemControlSourceType.External: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A u sure to delete this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's okay
in external dialog CommonSettingsSection was replaced to ExternalSelectorSettings
https://github.com/datalens-tech/datalens-ui/pull/3061/files/4afebe7bc85db502bcc0f377c3fdfa99e898277f#diff-8c4c3031da27e36359407126ab42797e3d9cf4d2dcdf4031ddb2f16e5add121fR107
| const handleSelectedTabsChange = React.useCallback( | ||
| (value: string[]) => { | ||
| // Always ensure current tab is included and can't be removed | ||
| // TODO: change logic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it actual?
| return TABS_SCOPE_ALL; | ||
| case TABS_SCOPE_SELECT_VALUE.CURRENT_TAB: | ||
| return currentTabId; | ||
| case TABS_SCOPE_SELECT_VALUE.AS_GROUP: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be joined with default
| return groupTabsScope; | ||
| } else if (Array.isArray(selectorTabsScope)) { | ||
| return selectorTabsScope; | ||
| } else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
redundant else
…github.com:datalens-tech/datalens-ui into CHARTS-11961-base-operations-with-global-selectors
No description provided.