Fix automation test modal row select losing track of the selected row.

This commit is contained in:
Sam Rose 2025-01-28 12:01:58 +00:00
parent 4a41207877
commit d1a7eb88bd
No known key found for this signature in database
1 changed files with 5 additions and 2 deletions

View File

@ -424,7 +424,7 @@
autocomplete: true,
filter: false,
getOptionLabel: row => row?.[primaryDisplay] || "",
compare: (a, b) => a?._id === b?._id,
compare: (a, b) => a?.[primaryDisplay] === b?.[primaryDisplay],
onChange: e => {
if (isTestModal) {
onChange({
@ -651,7 +651,10 @@
...request,
}
if (newTestData?.row?._id == null) {
if (
newTestData?.row == null ||
Object.keys(newTestData?.row).length === 0
) {
selectedRow = null
} else {
selectedRow = newTestData.row