@topconsultnpm/sdkui-react-beta 6.10.36 → 6.10.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ITMChooserFormProps } from '../../ts';
|
|
2
|
-
declare const TMChooserForm: <T>({ children, title, allowMultipleSelection, hasShowOnlySelectedItems, allowGrouping, allowSorting, width, height, dataSource, selectedIDs, manageUseLocalizedName, hasShowId, keyName, customButtons, showDefaultColumns, columns, summaryItems, convertID, customFilter, getItems, cellRenderIcon, cellRenderNameAndDesc, onChoose, onClose, onShowIdChanged }: ITMChooserFormProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const TMChooserForm: <T>({ children, title, allowMultipleSelection, hasShowOnlySelectedItems, allowGrouping, allowSorting, width, height, dataSource, selectedIDs, initAllItems, manageUseLocalizedName, hasShowId, keyName, customButtons, showDefaultColumns, columns, summaryItems, convertID, customFilter, getItems, cellRenderIcon, cellRenderNameAndDesc, onChoose, onClose, onShowIdChanged }: ITMChooserFormProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default TMChooserForm;
|
|
@@ -8,9 +8,9 @@ import TMToggleButton from '../base/TMToggleButton';
|
|
|
8
8
|
import TMModal from '../base/TMModal';
|
|
9
9
|
import TMLayoutContainer, { TMLayoutItem } from '../base/TMLayout';
|
|
10
10
|
import { TMColors } from '../../utils/theme';
|
|
11
|
-
const TMChooserForm = ({ children, title, allowMultipleSelection, hasShowOnlySelectedItems = false, allowGrouping, allowSorting = true, width, height, dataSource, selectedIDs, manageUseLocalizedName = true, hasShowId = true, keyName = "id", customButtons, showDefaultColumns = true, columns, summaryItems, convertID, customFilter, getItems, cellRenderIcon, cellRenderNameAndDesc, onChoose, onClose, onShowIdChanged }) => {
|
|
11
|
+
const TMChooserForm = ({ children, title, allowMultipleSelection, hasShowOnlySelectedItems = false, allowGrouping, allowSorting = true, width, height, dataSource, selectedIDs, initAllItems, manageUseLocalizedName = true, hasShowId = true, keyName = "id", customButtons, showDefaultColumns = true, columns, summaryItems, convertID, customFilter, getItems, cellRenderIcon, cellRenderNameAndDesc, onChoose, onClose, onShowIdChanged }) => {
|
|
12
12
|
const [showId, setShowId] = useState(false);
|
|
13
|
-
const [showOnlySelectedItems, setShowOnlySelectedItems] = useState(selectedIDs != undefined && selectedIDs.length > 0);
|
|
13
|
+
const [showOnlySelectedItems, setShowOnlySelectedItems] = useState(initAllItems ? !initAllItems : selectedIDs != undefined && selectedIDs.length > 0);
|
|
14
14
|
const [selectedItems, setSelectedItems] = useState([]);
|
|
15
15
|
const [items, setItems] = useState([]);
|
|
16
16
|
const [isInitialized, setIsInitialized] = useState(false);
|
package/lib/ts/types.d.ts
CHANGED
|
@@ -132,6 +132,7 @@ export interface ITMChooserFormProps<T> {
|
|
|
132
132
|
title?: any;
|
|
133
133
|
manageUseLocalizedName?: boolean;
|
|
134
134
|
tmSession?: ITopMediaSession;
|
|
135
|
+
initAllItems?: boolean;
|
|
135
136
|
convertID?: (item: T) => any;
|
|
136
137
|
customFilter?: (items: T[]) => T[];
|
|
137
138
|
cellRenderIcon?: (data: any) => JSX.Element | null;
|