score:1
Accepted answer
it's, probably, because your map function is wrong somehow. if you take a deep look you can check, for each key in productsandairlines.projects, the map function is returning an entirely new array. in the end, the options are being like
[
[{ value: 'pbs', label: 'pbs' },
{ value: 'pairing', label: 'pairing' },
{ value: 'mpp - insight', label: 'mpp - insight' },
{ value: 'bliss', label: 'bliss' },
{ value: 'shiftlogic', label: 'shiftlogic'}
]],
[{ value: 'pbs', label: 'pbs' },
{ value: 'pairing', label: 'pairing' },
{ value: 'mpp - insight', label: 'mpp - insight' },
{ value: 'bliss', label: 'bliss' },
{ value: 'shiftlogic', label: 'shiftlogic'}
]]
]
Source: stackoverflow.com
Related Query
- Populate react select options array with key value pairs from firebase collection
- How to populate select dropdown elements with data from API - ReactJS
- how to populate options for a react select by fetching values from an api to be visible when you click on the select box?
- How to populate select options from an Api call in React js on page load
- React - Fill select dropdown with data from API
- React Select - How to show / iterate through data from api call in option instead of hardcoding options?
- Dynamically Select Options From Multiple Select Dropdown With Reactstrap In React js
- React - how to populate one select menu based on a value of another select menu using data from a local .json file
- use axios with react to get data from api
- React redux frontend not fetching data from Django API with axios
- How to load and display data with React from an API running on localhost
- Extracting data from json object from API with JavaScript React Native
- React Select - Not loading data from an API
- Populate select options from an array in React
- I have spent the last 8 hours trying to pass a simple JSON object with some data from an api through my express backend to one of my react components
- React redux update input field with user text after data filled from API
- Get data properly from an API with React
- Correct way to display formatted JSON data from rest api with React
- How to obtain additional data from select options choice in React / Typescript app
- Pulling Data From Node.js Rest Api Into React with axios
- Update data from API fetch request with React Hooks?
- Creating dynamic table with data fetched from API in JS React Bootstrap
- Who to load dropdown options from API in react JS with typescript and react saga?
- Trying to populate BootstrapTable with the data from the API
- Problem of data recovery from a web API with javascript REACT
- How to populate object with data from another object in react js
- Trouble Recovering Data From API with Async in React
- Populating new select options from data returned from previous select using React
- Fetch some data from an api with React
- Fetching a data text from API response and presenting it in a chat with React
More Query from same tag
- Filtering using React and Redux, that will not prevent rerendering
- Using immer with IE11
- want to load initial Values in Redux Form
- waitFor times out after calling renderHook()
- State directly on "this"
- Failed to compile ./src/App.js Attempted import error: 'UserProvider' is not exported from './model/UserContext'
- React, WebPack and Babel for Internet Explorer 10 and below produces SCRIPT1002: Syntax error
- Passing props between components when one component is not a function?
- Share API data with other components by using React Hook, NO REDUX
- Best way to check if some data is present in the redux-store before performing an action
- Typescript - infer generic type from object prop value
- Enter text into multi stacked donut chart
- ReactJS: Reload a new instance of the component?
- Google Maps Api cannot call function inside dragend event
- Is it Anti-Pattern or less performant to split render functions in a Component?
- 403 error code when using axios.post to Django endpoint in React app
- React handleOnSubmit() need to be clicked twice
- How to add passive event listeners in React?
- Cannot figure out CORS in .net core 3.1 web api
- React and Axios fires twice (once undefined, once successfully)
- dropdown is not showing state value on page load
- Nextauth token keeps on nesting
- Why I'm getting `this.state.expenseItems.map is not a function`?
- Hide Header and Footer for specific Components in React JS
- useSelector from 'react-redux' is undefined when running application
- How to run an alert on button click React.js
- How to drop the query parameters after a redirect with NextJS?
- ReactJS Routes not working with Apache server
- React form is submitting twice without e.preventDefault() and zero times with e.preventDefault()
- Create nested table using react-table v7