-
Notifications
You must be signed in to change notification settings - Fork 30
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
RHSTOR-6347: Enable recipe-based DR enrollment for discovered applications #1589
base: master
Are you sure you want to change the base?
Changes from all 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 | ||||
---|---|---|---|---|---|---|
|
@@ -76,7 +76,11 @@ export const SelectableTable: SelectableTableProps = < | |||||
|
||||||
const [selectableRows, rowIds] = React.useMemo(() => { | ||||||
const selectableRows = | ||||||
sortedRows?.filter(isRowSelectable || hasNoDeletionTimestamp) || []; | ||||||
sortedRows?.filter((selectedRow) => | ||||||
!!isRowSelectable | ||||||
? isRowSelectable(selectedRow) | ||||||
: true && hasNoDeletionTimestamp(selectedRow) | ||||||
) || []; | ||||||
const rowIds = new Set(selectableRows?.map(getUID)); | ||||||
return [selectableRows, rowIds]; | ||||||
}, [sortedRows, isRowSelectable]); | ||||||
|
@@ -152,7 +156,7 @@ export const SelectableTable: SelectableTableProps = < | |||||
onSelect: onSelect, | ||||||
isSelected: isRowSelected(getUID(row), selectedRows), | ||||||
isDisabled: | ||||||
!isRowSelectable?.(row) || | ||||||
(!!isRowSelectable && !isRowSelectable?.(row)) || | ||||||
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. this is not needed...
Suggested change
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. original line was correct... |
||||||
!hasNoDeletionTimestamp(row), | ||||||
props: { | ||||||
id: getUID(row), | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -47,13 +47,18 @@ const useAsynchronousLoading: UseAsynchronousLoading = ( | |||||
const Component = React.useRef<React.ComponentType>(null); | ||||||
const [loadingStarted, setLoadingStarted] = React.useState(false); | ||||||
const [loaded, setLoaded] = React.useState(false); | ||||||
// Mount status for safty state updates | ||||||
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.
Suggested change
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. we can remove the comment as well... it's kind of self-explanatory from variable name itself... |
||||||
const mounted = React.useRef(true); | ||||||
React.useEffect(() => () => (mounted.current = false), []); | ||||||
|
||||||
const prevLoader = React.useRef<PromiseComponent>(null); | ||||||
|
||||||
const setComponent = React.useCallback( | ||||||
(value) => { | ||||||
Component.current = value; | ||||||
setLoaded(true); | ||||||
if (mounted.current) { | ||||||
setLoaded(true); | ||||||
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. To fix unit test case waring, React state update on an unmounted component 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. Just curious: there are other state variables too, why jest is complaining only about this one in particular ?? 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. are we sure there isn't some other reason for this warning ?? |
||||||
} | ||||||
}, | ||||||
[Component] | ||||||
); | ||||||
|
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.
To fix unit test case waring, div cannot appear as a descendant of p