Sha256: ce652bc5734d20cdad820c2a95891aaaf1f60435ff1fabe30ce6b9b412e1c251

Contents?: true

Size: 1.71 KB

Versions: 855

Compression:

Stored size: 1.71 KB

Contents

import React from 'react'
import { Button, Filter, Flex, Select, TextInput } from '../..'

const SortingChangeCallback = (sortOptions) => {
  alert(JSON.stringify(sortOptions[0]))
}

const FilterPlacement = (props) => {
  const options = [
    { value: 'USA' },
    { value: 'Canada' },
    { value: 'Brazil' },
    { value: 'Philippines' },
    { value: 'A galaxy far far away...' },
  ]
  return (

    <>
      <Filter
          double
          minWidth="360px"
          onSortChange={SortingChangeCallback}
          placement={"right"}
          results={1}
          sortOptions={{
            popularity: 'Popularity',
            // eslint-disable-next-line
            manager_title: 'Manager\'s Title',
            // eslint-disable-next-line
            manager_name: 'Manager\'s Name',
          }}
          sortValue={[{ name: 'popularity', dir: 'desc' }]}
          {...props}
      >
      {({ closePopover }) => (
        <form>

          <TextInput
              label="Example Text Field"
              placeholder="Enter Text"
              {...props}
          />

          <Select
              blankSelection="Select One..."
              label="Example Collection Select"
              name="Collection Select"
              options={options}
              {...props}
          />
          <Flex
              spacing="between"
              {...props}
          >
            <Button
                onClick={closePopover}
                text="Apply"
                {...props}
            />
            <Button
                text="Clear"
                variant="secondary"
                {...props}
            />
          </Flex>
        </form>
      )}
      </Filter>
    </>
  )
}

export default FilterPlacement

Version data entries

855 entries across 855 versions & 2 rubygems

Version Path
playbook_ui_docs-13.30.0.pre.alpha.PBNTR353draggablev53136 app/pb_kits/playbook/pb_filter/docs/_filter_placement.jsx
playbook_ui-13.30.0.pre.alpha.PBNTR353draggablev53136 app/pb_kits/playbook/pb_filter/docs/_filter_placement.jsx
playbook_ui_docs-13.30.0.pre.alpha.PLAY1328fixtimelinekitglobalpropsreact3096 app/pb_kits/playbook/pb_filter/docs/_filter_placement.jsx
playbook_ui-13.30.0.pre.alpha.PLAY1328fixtimelinekitglobalpropsreact3096 app/pb_kits/playbook/pb_filter/docs/_filter_placement.jsx
playbook_ui-13.30.0 app/pb_kits/playbook/pb_filter/docs/_filter_placement.jsx
playbook_ui_docs-13.29.0.pre.alpha.removeduplicatekitexampleclass3063 app/pb_kits/playbook/pb_filter/docs/_filter_placement.jsx
playbook_ui-13.29.0.pre.alpha.removeduplicatekitexampleclass3063 app/pb_kits/playbook/pb_filter/docs/_filter_placement.jsx
playbook_ui_docs-13.29.0.pre.alpha.PBNTR329draggablev33060 app/pb_kits/playbook/pb_filter/docs/_filter_placement.jsx
playbook_ui-13.29.0.pre.alpha.PBNTR329draggablev33060 app/pb_kits/playbook/pb_filter/docs/_filter_placement.jsx
playbook_ui_docs-13.29.0.pre.alpha.PBNTR329draggablev33059 app/pb_kits/playbook/pb_filter/docs/_filter_placement.jsx
playbook_ui-13.29.0.pre.alpha.PBNTR329draggablev33059 app/pb_kits/playbook/pb_filter/docs/_filter_placement.jsx
playbook_ui_docs-13.29.0.pre.alpha.testingcollapsibleissue3052 app/pb_kits/playbook/pb_filter/docs/_filter_placement.jsx
playbook_ui-13.29.0.pre.alpha.testingcollapsibleissue3052 app/pb_kits/playbook/pb_filter/docs/_filter_placement.jsx
playbook_ui-13.29.0 app/pb_kits/playbook/pb_filter/docs/_filter_placement.jsx
playbook_ui_docs-13.28.0.pre.alpha.PBNTR297gradientoverlay3029 app/pb_kits/playbook/pb_filter/docs/_filter_placement.jsx
playbook_ui-13.28.0.pre.alpha.PBNTR297gradientoverlay3029 app/pb_kits/playbook/pb_filter/docs/_filter_placement.jsx
playbook_ui_docs-13.28.0.pre.alpha.pbntr312tableheaderflexremoval3019 app/pb_kits/playbook/pb_filter/docs/_filter_placement.jsx
playbook_ui-13.28.0.pre.alpha.pbntr312tableheaderflexremoval3019 app/pb_kits/playbook/pb_filter/docs/_filter_placement.jsx
playbook_ui_docs-13.28.0.pre.alpha.dialogturbostreameventlistener3017 app/pb_kits/playbook/pb_filter/docs/_filter_placement.jsx
playbook_ui-13.28.0.pre.alpha.dialogturbostreameventlistener3017 app/pb_kits/playbook/pb_filter/docs/_filter_placement.jsx