Skip to content

Commit

Permalink
feat(Dropdown): remove deprecated selected_item property
Browse files Browse the repository at this point in the history
  • Loading branch information
langz committed Jan 9, 2023
1 parent 2fcc928 commit 9d60329
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions packages/dnb-eufemia/src/components/dropdown/Dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import PropTypes from 'prop-types'
import classnames from 'classnames'
import keycode from 'keycode'
import {
warn,
isTrue,
makeUniqueId,
extendPropsWithContextInClassComponent,
Expand Down Expand Up @@ -270,12 +269,6 @@ class DropdownInstance extends React.PureComponent {
this._ref = React.createRef()
this._refShell = React.createRef()
this._refButton = React.createRef()

// deprecated, use value instead
const dep = 'selected_item'
if (typeof props[dep] !== 'undefined') {
warn(`Dropdown: Please use "value" instead of "${dep}".`)
}
}

componentDidMount() {
Expand Down Expand Up @@ -388,7 +381,6 @@ class DropdownInstance extends React.PureComponent {
const attributes = this.attributes || {}
dispatchCustomElementEvent(this, 'on_select', {
...args,
// selected_item: args.value, // deprecated
attributes,
})
}
Expand Down

0 comments on commit 9d60329

Please sign in to comment.