aws-amplify / aws-amplify/amplify-studio

Amplify Studio - Data Manager Autocomplete field doesn't load all searchable data

Open
#1,079 2 comments 0 reactions 0 assignees View on GitHub
bug cms studio-ui
Dominant language
No language data
Stars
135
Forks
32
PR merge metrics
No merged PRs in 30d

Description

### Before opening, please confirm:

- [X] I have [searched for duplicate or closed issues](https://github.com/aws-amplify/amplify-adminui/issues?q=is%3Aissue+).
- [X] I have read the guide for [submitting bug reports](https://github.com/aws-amplify/amplify-adminui/blob/main/CONTRIBUTING.md#bug-reports).
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
- [X] I have removed any sensitive information from my code snippets and submission.

### App Id

d1thx85qzidq63

### Region

sa-east-1

### Environment name

dev

### Figma File Version (if applicable)

_No response_

### Amplify CLI Version

12.10.0

### If applicable, what version of Node.js are you using?

v18.17.1

### What operating system are you using?

Mac

### Browser type?

Google Chrome

### Describe the bug

Autocomplete field isn't loading all the data from DynamoDB (AppSync API).

When searching for `BB` the result box should show 23 results, but it only shows 1. I can see that the first query executed has a NextToken populated, but the UI isn't looping through the results to load all matching items from DB.

### Expected behavior

When searching for an Item on Autocomplete in Data Manager, I would expect to get all results that match the filter.

### Reproduction steps

1. Create the following schema
```
type Portfolio @model
@auth(
rules: [
{ allow: private, provider: [iam] }
]
) {
id: ID!
name: String!
tickers: [PortfolioTicker] @hasMany(indexName: "byPortfolio", fields: ["id"])
}

type PortfolioTicker @model
@auth(
rules: [
{ allow: private, provider: iam }
]
) {
portfolioId: ID! @primaryKey(sortKeyFields: ["symbol"]) @index(name: "byPortfolio")
portfolio: Portfolio @belongsTo(fields: ["portfolioId"])
symbol: String! @index(name: "byTicker")
ticker: Ticker @belongsTo(fields: ["symbol"])
entryDate: AWSDateTime!
}

type Ticker @model
@auth(
rules: [
{ allow: private, provider: iam }
]
) {
symbol: String! @primaryKey
name: String
portfolioTickers: [PortfolioTicker] @hasMany(indexName: "byTicker", fields: ["symbol"])
}
```
2. Populate Ticker with more than 50 items (you can retrieve a list of Tickers here: [Tickers](https://brapi.dev/api/available?); the `stocks` property will give you enough to start.
3. Open Amplify Studio and go to Data Manager
4. Create a new Portfolio without adding any Tickers
5. Change the type to `PortfolioTicker`
6. Click on Create new PortfolioTicker
7. Search for `BB` on the ticker autocomplete field.

The expected result should contain many instances of tickers with `BB`, but it doesn't show them all.

### Project Identifier

8893b0f513340872ef0f1d36b5e0b90a

### Additional information

_No response_

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue from Amplify Studio's Data Manager by searching the ticker autocomplete for `BB`, then trace how its AppSync API query handles the returned NextToken. Done means the autocomplete loads and displays all matching records rather than only the first page.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, graphql, node.js
Domain
api, databases, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.