mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-16 22:50:10 +03:00
parent
535e8e1d87
commit
92f97d7878
@ -80,6 +80,7 @@ const MarketplaceAppCard = memo(
|
||||
() =>
|
||||
getUniqueLabels(LABELS).map((label) => ({
|
||||
text: label,
|
||||
dataCy: `label-${label}`,
|
||||
stateColor: getColorFromString(label),
|
||||
onClick: onClickLabel,
|
||||
onDelete: enableEditLabels && onDeleteLabel,
|
||||
|
@ -111,6 +111,7 @@ const EnhancedTable = ({
|
||||
autoResetSelectedRows: false,
|
||||
autoResetSortBy: false,
|
||||
autoResetPage: false,
|
||||
autoResetGlobalFilter: false,
|
||||
// -------------------------------------
|
||||
initialState: { pageSize, ...initialState },
|
||||
},
|
||||
@ -125,7 +126,7 @@ const EnhancedTable = ({
|
||||
getTableProps,
|
||||
prepareRow,
|
||||
toggleAllRowsSelected,
|
||||
preFilteredRows,
|
||||
preGlobalFilteredRowsById,
|
||||
rows,
|
||||
page,
|
||||
gotoPage,
|
||||
@ -148,10 +149,11 @@ const EnhancedTable = ({
|
||||
?.scrollIntoView({ behavior: 'smooth', block: 'center' })
|
||||
}
|
||||
|
||||
const selectedRows = useMemo(
|
||||
() => preFilteredRows.filter((row) => !!state.selectedRowIds[row.id]),
|
||||
[data, state.selectedRowIds]
|
||||
)
|
||||
const selectedRows = useMemo(() => {
|
||||
const selectedIds = Object.keys(state.selectedRowIds ?? {})
|
||||
|
||||
return selectedIds.map((id) => preGlobalFilteredRowsById[id])
|
||||
}, [state.selectedRowIds])
|
||||
|
||||
useMountedLayoutEffect(() => {
|
||||
onSelectedRowsChange?.(
|
||||
|
@ -121,9 +121,15 @@ const Settings = () => {
|
||||
</Typography>
|
||||
</Box>
|
||||
<Stack height={1} gap="0.5rem" p="0.5rem" overflow="auto">
|
||||
{labels.length === 0 && (
|
||||
<Typography variant="subtitle2">
|
||||
<Translate word={T.NoLabels} />
|
||||
</Typography>
|
||||
)}
|
||||
{result?.map((label) => (
|
||||
<LabelWrapper
|
||||
key={label}
|
||||
data-cy={`wrapper-${label}`}
|
||||
// highlight the label when it is added
|
||||
ownerState={{ highlight: data === label }}
|
||||
>
|
||||
|
Loading…
x
Reference in New Issue
Block a user