id)
+ .toString()}
+ draggable={groupedUserCredentials.length > 1}
+ onDrop={onDrop}
+ onDragEnd={onDragEnd}
+ onDragStart={onDragStart}
+ >
{
- const rows = groupedUserCredentials.map(
- (credential, index) =>
- index === rowIndex
- ? {
- ...credential,
- isExpanded: !credential.isExpanded,
- }
- : credential
- );
- setGroupedUserCredentials(rows);
- },
+ className={
+ groupedUserCredentials.length === 1 ? "one-row" : ""
+ }
+ draggableRow={{
+ id: `draggable-row-${groupedCredential.value.map(
+ ({ id }) => id
+ )}`,
}}
/>
- ) : (
- | |
- )}
-
- {toUpperCase(groupedCredential.key)}
- |
- {groupedCredential.value.length <= 1 &&
- groupedCredential.value.map((credential) => (
-
- ))}
-
- {groupedCredential.isExpanded &&
- groupedCredential.value.map((credential) => (
-
- |
+ {groupedCredential.value.length > 1 ? (
id
- )}`,
+ className="kc-expandRow-btn"
+ expand={{
+ rowIndex,
+ isExpanded: groupedCredential.isExpanded,
+ onToggle: (_, rowIndex) => {
+ const rows = groupedUserCredentials.map(
+ (credential, index) =>
+ index === rowIndex
+ ? {
+ ...credential,
+ isExpanded: !credential.isExpanded,
+ }
+ : credential
+ );
+ setGroupedUserCredentials(rows);
+ },
}}
/>
- | |
+ )}
+
+ {toUpperCase(groupedCredential.key)}
+ |
+ {groupedCredential.value.length <= 1 &&
+ groupedCredential.value.map((credential) => (
+
+ ))}
+
+ {groupedCredential.isExpanded &&
+ groupedCredential.value.map((credential) => (
+