-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d7dcdd2
commit a034679
Showing
9 changed files
with
235 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 11 additions & 2 deletions
13
plugins/wazuh-security-policies/public/components/utils/inputs/object-inputs.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,22 @@ | ||
import { inputString } from './string-inputs'; | ||
|
||
export const inputObject = ( | ||
input: { key: string; value: any }, | ||
input: { key: string; value: any; handleSetItem: any; keyValue?: string }, | ||
isEditable: boolean, | ||
) => { | ||
const inputsList = Object.entries(input.value).map(([key, value]) => ({ | ||
key: `${input.key}.${key}`, | ||
value, | ||
})); | ||
|
||
return inputsList.map(item => inputString(item, isEditable)); | ||
return inputsList.map(item => | ||
inputString( | ||
{ | ||
...item, | ||
handleSetItem: input.handleSetItem, | ||
keyValue: input.keyValue ?? '', | ||
}, | ||
isEditable, | ||
), | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.