aws-amplify / aws-amplify/amplify-studio

filtering shows results when comparing a int to a string

Open
#956 0 comments 0 reactions 0 assignees View on GitHub
bug studio-ui ui-collection ux
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

d12tfj613dbsej

### Region

us-east-1

### Environment name

d12tfj613dbsej

### Figma File Version (if applicable)

_No response_

### Amplify CLI Version

_No response_

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

_No response_

### What operating system are you using?

_No response_

### Browser type?

_No response_

### Describe the bug

Filtering the records with incorrect type(int equals string) in collection provides random data.

For example correct data where i have 1 record with `age equals 16`
![image](https://github.com/aws-amplify/amplify-studio/assets/87995712/db30c0fe-5a94-4dc8-925a-0d23b506a69c)

random data when setting `age equals "16"`
![image](https://github.com/aws-amplify/amplify-studio/assets/87995712/b5d0310a-6137-4653-bebf-4e70e7296f6c)

### Expected behavior

show no data when filtering with wrong data type

### Reproduction steps

1. create a model with int as type
2. add 2 records with different values
3. link the model to a component
4. create collection
5. filter collection with the field
6. observe filtering by value vs filtering by string

### Project Identifier

_No response_

### Additional information

_No response_

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue using the listed model, records, linked component, collection, and mismatched filter value. Start by tracing the collection filtering path used by the component; done means an integer field compared with a string returns no records, while a correctly typed value still returns the matching record.

Written by the indexing model from the issue text.

Assessment

Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.