-
Notifications
You must be signed in to change notification settings - Fork 24
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
fix: unique values only across single service #1413
base: develop
Are you sure you want to change the base?
Conversation
f083710
to
160f147
Compare
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.
I think it's worth adding an e2e UI test to capture this behavior. Before this feature - the test would fail, after - it would succeed.
Let's find a suitable place to document it as well.
This would resolve #1369. |
@@ -259,7 +259,7 @@ const CustomTable: React.FC<CustomTableProps> = ({ | |||
data.length && | |||
data.map((row) => ( | |||
<CustomTableRow // nosemgrep: typescript.react.best-practice.react-props-spreading.react-props-spreading | |||
key={row.name || row.id} | |||
key={`${row.serviceName}-${row.name}-row` || row.id} |
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.
key={`${row.serviceName}-${row.name}-row` || row.id} | |
key={`${row.serviceName}-${row.name}-row`} |
the second part is unreachable
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.
yea weird mistake, i probably wanted to create sth like:
key={row.name ?
${row.serviceName}-${row.name}-row : row.id}
but i think name should always be there so maybe no need for this one
Issue number:
https://splunk.atlassian.net/browse/ADDON-77229
resolves #1369
Summary
Ui now verifies uniqueness of inputs service names only across data for each service.
Changes
UI verification for service name to exist has been narrowed down.
User experience
Right now user can create inputs with the same name for different services.
Checklist
If your change doesn't seem to apply, please leave them unchecked.