I'm building a Todo app in react and I added a multiple select named "category", the idea is when an user enters the item, have the option to select the category the task falls into.
I'm able to fetch the title, but from that I have read multiple select returns in an array form. if I pre select a category in airtable, it will be displayed on the app, so that gives an idea that at least the fetching is working.
Here is the code
useEffect(() => {
const newTodoList = [];
base("Default").select({ view: "Grid view" }).eachPage(
(records, fetchNextPage) => {
records.forEach((record) => {
newTodoList.push({
id: record.id,
title: record.get("title"),
// Need to retrieve all values from field
category: record.get("category"),
});
});
fetchNextPage();
When I console.log(newTodoList) the object returns with category undefined, if the field in airtable is empty but if I pre select an option, then it will appear.
These are the keywords I search for in the forum and nothing : "fetch values multiple select field", "multiple select field javascript", "multiple select"