Skip to content

Commit

Permalink
Merge branch 'main' into combobox-ref
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] authored Jul 8, 2021
2 parents fa6e87d + 0f73241 commit d379845
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 7 deletions.
6 changes: 6 additions & 0 deletions packages/components/src/components/list-box/_list-box.scss
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,9 @@ $list-box-menu-width: rem(300px);
.#{$prefix}--list-box--up.#{$prefix}--dropdown--sm
.#{$prefix}--list-box__menu,
.#{$prefix}--list-box--up.#{$prefix}--list-box--sm
.#{$prefix}--list-box__menu,
.#{$prefix}--list-box--up
.#{$prefix}--list-box--sm
.#{$prefix}--list-box__menu {
bottom: 2rem;
}
Expand All @@ -766,6 +769,9 @@ $list-box-menu-width: rem(300px);
.#{$prefix}--list-box--up.#{$prefix}--dropdown--lg
.#{$prefix}--list-box__menu,
.#{$prefix}--list-box--up.#{$prefix}--list-box--lg
.#{$prefix}--list-box__menu,
.#{$prefix}--list-box--up
.#{$prefix}--list-box--lg
.#{$prefix}--list-box__menu {
bottom: 3rem;
}
Expand Down
18 changes: 12 additions & 6 deletions packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -985,9 +985,7 @@ Map {
"overflowMenuOnHover": Object {
"type": "bool",
},
"shouldShowBorder": Object {
"type": "bool",
},
"shouldShowBorder": [Function],
"size": Object {
"args": Array [
Array [
Expand Down Expand Up @@ -1624,9 +1622,7 @@ Map {
"overflowMenuOnHover": Object {
"type": "bool",
},
"shouldShowBorder": Object {
"type": "bool",
},
"shouldShowBorder": [Function],
"size": Object {
"args": Array [
Array [
Expand Down Expand Up @@ -3566,6 +3562,7 @@ Map {
"defaultProps": Object {
"ariaLabel": "Choose an item",
"compareItems": [Function],
"direction": "bottom",
"disabled": false,
"filterItems": [Function],
"initialSelectedItems": Array [],
Expand All @@ -3585,6 +3582,15 @@ Map {
"isRequired": true,
"type": "func",
},
"direction": Object {
"args": Array [
Array [
"top",
"bottom",
],
],
"type": "oneOf",
},
"disabled": Object {
"type": "bool",
},
Expand Down
8 changes: 7 additions & 1 deletion packages/react/src/components/DataTable/Table.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';
import { settings } from 'carbon-components';
import deprecate from '../../prop-types/deprecate.js';

const { prefix } = settings;

Expand Down Expand Up @@ -70,7 +71,12 @@ Table.propTypes = {
/**
* `false` If true, will remove the table border
*/
shouldShowBorder: PropTypes.bool,
shouldShowBorder: deprecate(
PropTypes.bool,
'The `shouldShowBorder` prop has been deprecated and can be safely removed.' +
'This prop will be removed in the next major release of ' +
'`carbon-components-react`'
),

/**
* Change the row height of table. Currently supports `xs`, `sm`, `md`, `lg`, and `xl`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ export default class FilterableMultiSelect extends React.Component {
*/
ariaLabel: PropTypes.string,

/**
* Specify the direction of the multiselect dropdown. Can be either top or bottom.
*/
direction: PropTypes.oneOf(['top', 'bottom']),

/**
* Disable the control
*/
Expand Down Expand Up @@ -165,6 +170,7 @@ export default class FilterableMultiSelect extends React.Component {
static defaultProps = {
ariaLabel: 'Choose an item',
compareItems: defaultCompareItems,
direction: 'bottom',
disabled: false,
filterItems: defaultFilterItems,
initialSelectedItems: [],
Expand Down Expand Up @@ -277,6 +283,7 @@ export default class FilterableMultiSelect extends React.Component {
const {
ariaLabel,
className: containerClassName,
direction,
disabled,
filterItems,
items,
Expand Down Expand Up @@ -312,6 +319,7 @@ export default class FilterableMultiSelect extends React.Component {
[`${prefix}--multi-select__wrapper--inline--invalid`]:
inline && invalid,
[`${prefix}--list-box__wrapper--inline--invalid`]: inline && invalid,
[`${prefix}--list-box--up`]: direction === 'top',
}
);
const helperId = !helperText
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ exports[`MultiSelect.Filterable should render 1`] = `
<MultiSelect.Filterable
ariaLabel="Choose an item"
compareItems={[Function]}
direction="bottom"
disabled={false}
filterItems={[Function]}
id="test-filterable-multiselect"
Expand Down

0 comments on commit d379845

Please sign in to comment.