diff --git a/src/app/ui/tables/inputs/genrePickerInput.tsx b/src/app/ui/tables/inputs/genrePickerInput.tsx index ddedd5f..8ecdb5f 100644 --- a/src/app/ui/tables/inputs/genrePickerInput.tsx +++ b/src/app/ui/tables/inputs/genrePickerInput.tsx @@ -24,7 +24,7 @@ export default function GenrePickerInputCell(props: CellContext) { const genres = props.table.options.meta.genres const [isActive, setIsActive] = useState(false) - async function onSubmit({ genres }: { genres: number[] }, event: Event) { + async function onSubmit({ genres }: { genres: number[] }) { event.preventDefault() const genresArray = genres.map((e) => { return { id: e } }) console.log(`genres: ${genres}, genresArray: ${JSON.stringify(genresArray)}`) @@ -42,7 +42,7 @@ export default function GenrePickerInputCell(props: CellContext) { // genres: genresArray, // pathname // }) - // setIsActive(false) + setIsActive(false) } function onErrors(errors) { @@ -65,11 +65,14 @@ export default function GenrePickerInputCell(props: CellContext) { genres: value.map(e => e.id) } }) + + const formId = "editGenresForm" + props.cell.id + return (
- - + + setIsActive(prev => !prev)}> ) { }} /> ))} - +