1
1
// Utils
2
2
import memoize from '../../utils/memoize'
3
3
import upperFirst from '../../utils/upper-first'
4
- import warn from '../../utils/warn'
5
4
import { arrayIncludes } from '../../utils/array'
6
5
import { getBreakpointsUpCached } from '../../utils/config'
7
6
import { select , selectAll , isVisible , setAttr , removeAttr , getAttr } from '../../utils/dom'
@@ -25,9 +24,6 @@ const NAME = 'BFormGroup'
25
24
// Selector for finding first input in the form-group
26
25
const SELECTOR = 'input:not([disabled]),textarea:not([disabled]),select:not([disabled])'
27
26
28
- const DEPRECATED_MSG =
29
- 'Props "horizontal" and "breakpoint" are deprecated. Use "label-cols(-{breakpoint})" props instead.'
30
-
31
27
// Render helper functions (here rather than polluting the instance with more methods)
32
28
const renderInvalidFeedback = ( h , ctx ) => {
33
29
const content = ctx . normalizeSlot ( 'invalid-feedback' ) || ctx . invalidFeedback
@@ -235,18 +231,6 @@ const generateProps = () => {
235
231
disabled : {
236
232
type : Boolean ,
237
233
default : false
238
- } ,
239
- horizontal : {
240
- // Deprecated
241
- type : Boolean ,
242
- default : false ,
243
- deprecated : DEPRECATED_MSG
244
- } ,
245
- breakpoint : {
246
- // Deprecated (ignored if horizontal is not true)
247
- type : String ,
248
- default : null , // legacy value 'sm',
249
- deprecated : DEPRECATED_MSG
250
234
}
251
235
}
252
236
}
@@ -268,18 +252,6 @@ export const BFormGroup = {
268
252
computed : {
269
253
labelColProps ( ) {
270
254
const props = { }
271
- /* istanbul ignore next: deprecated */
272
- if ( this . horizontal ) {
273
- // Deprecated setting of horizontal/breakpoint props
274
- /* istanbul ignore next */
275
- warn ( `b-form-group: ${ DEPRECATED_MSG } ` )
276
- // Legacy default is breakpoint sm and cols 3
277
- const bp = this . breakpoint || getBreakpointsUpCached ( ) [ 1 ] // 'sm'
278
- const cols = parseInt ( this . labelCols , 10 ) || 3
279
- props [ bp ] = cols > 0 ? cols : 3
280
- // We then return the single breakpoint prop for legacy compatibility
281
- return props
282
- }
283
255
getBreakpointsUpCached ( ) . forEach ( breakpoint => {
284
256
// Grab the value if the label column breakpoint prop
285
257
let propVal = this [ makePropName ( breakpoint , 'labelCols' ) ]
0 commit comments