swarm-ui: try-out rows keyed by position, distinct names, and accurate storage wording
Two classifications sharing a name made the result table's row key collide, so the form now refuses duplicate names and the table keys rows by position anyway. The page said it stores nothing in the browser, but the result table remembers its column filters like every table does; the header comment and the docs now say that. The row cap's comment says to keep it in step with the endpoint's own cap.
This commit is contained in:
parent
b67517e41b
commit
a4a4381cf6
1 changed files with 26 additions and 7 deletions
|
|
@ -51,7 +51,9 @@ export function TryOutResult({ result }: { result: Result }) {
|
|||
<Table
|
||||
columns={COLUMNS}
|
||||
rows={rows}
|
||||
rowKey={(r) => r.name}
|
||||
// By position: two classifications may share a name, and a shared key
|
||||
// would let one result render over the other.
|
||||
rowKey={(r) => String(rows.indexOf(r))}
|
||||
storageKey="swarm-ui:review-tryout:table-filters"
|
||||
emptyMessage="the run returned no classifications"
|
||||
/>
|
||||
|
|
|
|||
Loading…
Reference in a new issue