Remove fixtures when input has value
See original GitHub issueShort description
I’m trying to remove the fixtures when the input has value.
Expected results
The fixtures should be removed
Actual results
The fixtures are still there
Additional Information
I saved the input value into the state using onChange method, and I tried the following methods:
const [value, setValue] = useState('');
- Using the fixtures prop and the state to filter the fixtures.
<Geosuggest
fixtures={fixtures.filter(({ label }) => label.loLowerCase().includes(value))}
onChange={(v) => {
setValue(v.toLowerCase());
}}
or
<Geosuggest
fixtures={value ? null : fixtures)}
onChange={(v) => {
setValue(v.toLowerCase());
}}
- Using the skipSuggest prop (as suggested here: https://github.com/ubilabs/react-geosuggest/issues/371) Note: there is no isFixtures property on the skipSuggest parameter, but only the fixtures have label
<Geosuggest
skipSuggest={({ label }) => !!(value && label)}
fixtures={fixtures}
onChange={(v) => {
setValue(v.toLowerCase());
}}
I even tried changing maxFixtures base on the value, but it didn’t work.
Is there any solution to this problem ? Or is there something wrong in my code ? Thank you for your time!
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Angular 4 (karma) Test input value to input filed - Stack Overflow
Removing WhenStable() make this happens. it('Test input field value. ', async () => { const divDescription = fixture.
Read more >A number input will always have left pad 0 though parseFloat ...
I have a number input with defalut value 0 and in onChange function ... behavior is consistent, we can probably remove the manual...
Read more >Eliminating Fixture Effects from Embedded Measurements
Introduction. It is often necessary to measure a Device Under Test (DUT), which is mounted on a fixture attached to a printed circuit...
Read more >How to use fixtures — pytest documentation
“Requesting” fixtures¶. At a basic level, test functions request fixtures they require by declaring them as arguments. When pytest goes to run a...
Read more >Fixture to suppress display of warnings - MATLAB - MathWorks
Create Fixture to Suppress Warnings. Suppress the warning that occurs when you try to remove a folder from the search path that is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Will be fixed by Ubilabs upcoming week
Ah, thanks! Could reproduce it and fixed it. When the PR went through I’ll publish later today.