-
Notifications
You must be signed in to change notification settings - Fork 86
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
Enable Parent Item Selection In Dropdown #4705
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -355,6 +355,7 @@ declare module 'superdesk-api' { | |
vocabularyId: IVocabulary['_id']; | ||
multiple: boolean; | ||
filter?(vocabulary: IVocabularyItem): boolean; | ||
canSelectBranchWithChildren?: boolean; | ||
} | ||
|
||
export interface IDropdownConfigRemoteSource extends ICommonFieldConfig { | ||
|
@@ -366,18 +367,21 @@ declare module 'superdesk-api' { | |
): void; | ||
getLabel(item: unknown): string; | ||
getId(item: unknown): string; | ||
canSelectBranchWithChildren?(branch: ITreeNode<unknown>): boolean; | ||
canSelectBranchWithChildren?: boolean; | ||
optionTemplate?: React.ComponentType<{item: unknown}>; | ||
valueTemplate?: React.ComponentType<{item: unknown}>; | ||
multiple: boolean; | ||
} | ||
|
||
/** | ||
* @deprecated Use IDropdownConfigManualSource/IDropdownConfigVocabulary/IDropdownConfigRemoteSource | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can it be removed instead of deprecating? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure if we need to deprecate it. Maybe it's enough to warn not to use this one if use case can be satisfied using other dropdown sources. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No need, but I thought it's the better direction There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
*/ | ||
export interface IDropdownTreeConfig extends ICommonFieldConfig { | ||
source: 'dropdown-tree'; | ||
getItems(): ITreeWithLookup<unknown>; | ||
getLabel(item: unknown): string; | ||
getId(item: unknown): string; | ||
canSelectBranchWithChildren?(branch: ITreeNode<unknown>): boolean; | ||
canSelectBranchWithChildren?: boolean; | ||
optionTemplate?: React.ComponentType<{item: unknown}>; | ||
valueTemplate?: React.ComponentType<{item: unknown}>; | ||
multiple: boolean; | ||
|
@@ -389,6 +393,7 @@ declare module 'superdesk-api' { | |
options: Array<IDropdownOption>; | ||
roundCorners: boolean; | ||
multiple: boolean; | ||
canSelectBranchWithChildren?: boolean; | ||
} | ||
|
||
export type IDropdownConfig = | ||
|
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.
keep capability to allow/disallow based on a tree node
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.
not supported in uif component, we talked about it and decided to leave as is