import React from 'react' class ResourcePickerWindow extends React.Component { constructor(props) { super(props) this.typeOptions = [ ['subject', 'subject'], ['grade', 'grade'], ['module', 'module'], ['unit', 'unit'], ] this.subjectOptions = [ ['ela', 'ELA'], ['math', 'Math'], ] this.gradeOptions = [ ['pk', 'prekindergarten'], ['k', 'kindergarten'], ['1', 'grade 1'], ['2', 'grade 2'], ['3', 'grade 3'], ['4', 'grade 4'], ['5', 'grade 5'], ['6', 'grade 6'], ['7', 'grade 7'], ['8', 'grade 8'], ['9', 'grade 9'], ['10', 'grade 10'], ['11', 'grade 11'], ['12', 'grade 12'], ] const initialState = { pagination: { current_page: 1, total_pages: 0, }, results: [], type: null, subject: null, grade: null, q: null, } this.state = { ...initialState, ...props } } filterElement(title, value, type, data) { return ( ) } selectResource(resource) { if ('onSelectResource' in this.props) { this.props.onSelectResource(resource) } } render() { const { grade, q, subject, type } = this.props return (
Title |
---|
{resource.title} |