File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -207,6 +207,34 @@ describe('table > filtering', () => {
207207 wrapper . destroy ( )
208208 } )
209209
210+ it ( 'should filter for formatted values for keys which are not present in row' , async ( ) => {
211+ const wrapper = mount ( BTable , {
212+ propsData : {
213+ items : [ { a : 'A' , b : 'B' } ] ,
214+ fields : [
215+ { key : 'a' } ,
216+ {
217+ key : 'b' ,
218+ formatter : ( ) => 'Foo' ,
219+ filterByFormatted : true
220+ } ,
221+ {
222+ key : 'c' ,
223+ formatter : ( ) => 'Bar' ,
224+ filterByFormatted : true
225+ }
226+ ] ,
227+ filter : 'Bar'
228+ }
229+ } )
230+ expect ( wrapper ) . toBeDefined ( )
231+ await waitNT ( wrapper . vm )
232+
233+ expect ( wrapper . findAll ( 'tbody > tr' ) . length ) . toBe ( 1 )
234+
235+ wrapper . destroy ( )
236+ } )
237+
210238 it ( 'should show empty filtered message when no matches and show-empty=true' , async ( ) => {
211239 const wrapper = mount ( BTable , {
212240 propsData : {
You can’t perform that action at this time.
0 commit comments