vuejs search filter “TypeError: Cannot read property 'filter' of null”2019 Community Moderator ElectionVuejs error: Uncaught TypeError: Cannot read property 'removeChild' of nullvue.js - Uncaught TypeError: Cannot read property '$forContext' of nullVueJS: Uncaught (in promise) TypeError: Cannot read property 'push' of undefinedTypeError: Cannot read property '$auth' of undefined VuejsVuejs when reseting data TypeError: Cannot read property 'name' of undefinedVuejs TypeError: Cannot use 'in' operator to search forCannot read property 'list' of null - VueJSUncaught TypeError: Cannot read property '$store' of nullVuejs TypeError: Cannot read property 'placeholder' of undefined"TypeError: Cannot read property 'push' of undefined [VueJs]
Why the color red for the Republican Party
Does a Catoblepas statblock appear in an official D&D 5e product?
Force user to remove USB token
Built-In Shelves/Bookcases - IKEA vs Built
In the late 1940’s to early 1950’s what technology was available that could melt a LOT of ice?
What are the pros and cons of practising figure-eight landings on perpendicular runways?
Should QA ask requirements to developers?
String reversal in Python
Are the terms "stab" and "staccato" synonyms?
Algorithm to convert a fixed-length string to the smallest possible collision-free representation?
What do you call the air that rushes into your car in the highway?
The bar has been raised
My story is written in English, but is set in my home country. What language should I use for the dialogue?
Does splitting a potentially monolithic application into several smaller ones help prevent bugs?
Do I really need to have a scientific explanation for my premise?
MTG: Can I kill an opponent in response to lethal activated abilities, and not take the damage?
They call me Inspector Morse
How much attack damage does the AC boost from a shield prevent on average?
Latest web browser compatible with Windows 98
Best approach to update all entries in a list that is paginated?
Why does Deadpool say "You're welcome, Canada," after shooting Ryan Reynolds in the end credits?
How much stiffer are 23c tires over 28c?
Making a sword in the stone, in a medieval world without magic
Time travel short story where dinosaur doesn't taste like chicken
vuejs search filter “TypeError: Cannot read property 'filter' of null”
2019 Community Moderator ElectionVuejs error: Uncaught TypeError: Cannot read property 'removeChild' of nullvue.js - Uncaught TypeError: Cannot read property '$forContext' of nullVueJS: Uncaught (in promise) TypeError: Cannot read property 'push' of undefinedTypeError: Cannot read property '$auth' of undefined VuejsVuejs when reseting data TypeError: Cannot read property 'name' of undefinedVuejs TypeError: Cannot use 'in' operator to search forCannot read property 'list' of null - VueJSUncaught TypeError: Cannot read property '$store' of nullVuejs TypeError: Cannot read property 'placeholder' of undefined"TypeError: Cannot read property 'push' of undefined [VueJs]
I want to search by tc number in the table. I took advantage of https://element.eleme.io/#/en-US/component/table. But I get an error as follows.
"TypeError: Cannot read property 'filter' of null"
The code I wrote is as follows.
<template>
<div class="app-container">
<div class="filter-container">
<el-input :placeholder="TC arama" v-model="search" style="width:
200px;" class="filter-item"/>
</div>
<el-table
:data="list.filter(data => !search ||
data.tc.toLowerCase().includes(search.toLowerCase()))"
border
fit
highlight-current-row
style="width: 100%;">
<el-table-column :label="ID" prop="id" width="65"/>
<el-table-column :label="TC" prop="tc" min-width="110px"/>
</el-table>
</div>
</template>
<script>
export default
data()
return
filter: '',
search: '',
list: [
id: 1,
tc: "12345678944"
,
id: 2,
tc: "25639874532"
,
id: 3,
tc: "23669874120"
]
</script>
vue.js
add a comment |
I want to search by tc number in the table. I took advantage of https://element.eleme.io/#/en-US/component/table. But I get an error as follows.
"TypeError: Cannot read property 'filter' of null"
The code I wrote is as follows.
<template>
<div class="app-container">
<div class="filter-container">
<el-input :placeholder="TC arama" v-model="search" style="width:
200px;" class="filter-item"/>
</div>
<el-table
:data="list.filter(data => !search ||
data.tc.toLowerCase().includes(search.toLowerCase()))"
border
fit
highlight-current-row
style="width: 100%;">
<el-table-column :label="ID" prop="id" width="65"/>
<el-table-column :label="TC" prop="tc" min-width="110px"/>
</el-table>
</div>
</template>
<script>
export default
data()
return
filter: '',
search: '',
list: [
id: 1,
tc: "12345678944"
,
id: 2,
tc: "25639874532"
,
id: 3,
tc: "23669874120"
]
</script>
vue.js
add a comment |
I want to search by tc number in the table. I took advantage of https://element.eleme.io/#/en-US/component/table. But I get an error as follows.
"TypeError: Cannot read property 'filter' of null"
The code I wrote is as follows.
<template>
<div class="app-container">
<div class="filter-container">
<el-input :placeholder="TC arama" v-model="search" style="width:
200px;" class="filter-item"/>
</div>
<el-table
:data="list.filter(data => !search ||
data.tc.toLowerCase().includes(search.toLowerCase()))"
border
fit
highlight-current-row
style="width: 100%;">
<el-table-column :label="ID" prop="id" width="65"/>
<el-table-column :label="TC" prop="tc" min-width="110px"/>
</el-table>
</div>
</template>
<script>
export default
data()
return
filter: '',
search: '',
list: [
id: 1,
tc: "12345678944"
,
id: 2,
tc: "25639874532"
,
id: 3,
tc: "23669874120"
]
</script>
vue.js
I want to search by tc number in the table. I took advantage of https://element.eleme.io/#/en-US/component/table. But I get an error as follows.
"TypeError: Cannot read property 'filter' of null"
The code I wrote is as follows.
<template>
<div class="app-container">
<div class="filter-container">
<el-input :placeholder="TC arama" v-model="search" style="width:
200px;" class="filter-item"/>
</div>
<el-table
:data="list.filter(data => !search ||
data.tc.toLowerCase().includes(search.toLowerCase()))"
border
fit
highlight-current-row
style="width: 100%;">
<el-table-column :label="ID" prop="id" width="65"/>
<el-table-column :label="TC" prop="tc" min-width="110px"/>
</el-table>
</div>
</template>
<script>
export default
data()
return
filter: '',
search: '',
list: [
id: 1,
tc: "12345678944"
,
id: 2,
tc: "25639874532"
,
id: 3,
tc: "23669874120"
]
</script>
vue.js
vue.js
asked Mar 7 at 7:58
user11088950user11088950
83
83
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
There are several error in your code please refer this code.
fiddle - https://jsfiddle.net/9px5sba7/
<script src="//unpkg.com/vue/dist/vue.js"></script>
<script src="//unpkg.com/element-ui@2.6.1/lib/index.js"></script>
<div id="app">
<template>
<el-table
:data="tableData.filter(data => !search || data.tc.toLowerCase().includes(search.toLowerCase()))" border
fit
highlight-current-row
style="width: 100%">
<el-table-column
label="Id"
prop="id">
</el-table-column>
<el-table-column
label="Tc"
prop="tc">
</el-table-column>
<el-table-column
align="right">
<template slot="header" slot-scope="scope">
<el-input
v-model="search"
size="mini"
placeholder="Type to search"/>
</template>
</el-table-column>
</el-table>
<div class="filter-container">
<el-input placeholder="TC arama" v-model="search" style="width:
200px;" class="filter-item"/>
</div>
<el-table
:data="tableData.filter(data => !search ||
data.tc.toLowerCase().includes(search.toLowerCase()))"
border
fit
highlight-current-row
style="width: 100%;">
<el-table-column label="ID" prop="id" width="65"/>
<el-table-column label="TC" prop="tc" min-width="110px"/>
</el-table>
</template>
</div>
var Main =
data()
return
tableData: [
id: 1,
tc: "1233",
,
id: 1,
tc: "234",
],
search: '',
,
methods:
handleEdit(index, row)
console.log(index, row);
,
handleDelete(index, row)
console.log(index, row);
,
var Ctor = Vue.extend(Main)
new Ctor().$mount('#app')
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55038743%2fvuejs-search-filter-typeerror-cannot-read-property-filter-of-null%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
There are several error in your code please refer this code.
fiddle - https://jsfiddle.net/9px5sba7/
<script src="//unpkg.com/vue/dist/vue.js"></script>
<script src="//unpkg.com/element-ui@2.6.1/lib/index.js"></script>
<div id="app">
<template>
<el-table
:data="tableData.filter(data => !search || data.tc.toLowerCase().includes(search.toLowerCase()))" border
fit
highlight-current-row
style="width: 100%">
<el-table-column
label="Id"
prop="id">
</el-table-column>
<el-table-column
label="Tc"
prop="tc">
</el-table-column>
<el-table-column
align="right">
<template slot="header" slot-scope="scope">
<el-input
v-model="search"
size="mini"
placeholder="Type to search"/>
</template>
</el-table-column>
</el-table>
<div class="filter-container">
<el-input placeholder="TC arama" v-model="search" style="width:
200px;" class="filter-item"/>
</div>
<el-table
:data="tableData.filter(data => !search ||
data.tc.toLowerCase().includes(search.toLowerCase()))"
border
fit
highlight-current-row
style="width: 100%;">
<el-table-column label="ID" prop="id" width="65"/>
<el-table-column label="TC" prop="tc" min-width="110px"/>
</el-table>
</template>
</div>
var Main =
data()
return
tableData: [
id: 1,
tc: "1233",
,
id: 1,
tc: "234",
],
search: '',
,
methods:
handleEdit(index, row)
console.log(index, row);
,
handleDelete(index, row)
console.log(index, row);
,
var Ctor = Vue.extend(Main)
new Ctor().$mount('#app')
add a comment |
There are several error in your code please refer this code.
fiddle - https://jsfiddle.net/9px5sba7/
<script src="//unpkg.com/vue/dist/vue.js"></script>
<script src="//unpkg.com/element-ui@2.6.1/lib/index.js"></script>
<div id="app">
<template>
<el-table
:data="tableData.filter(data => !search || data.tc.toLowerCase().includes(search.toLowerCase()))" border
fit
highlight-current-row
style="width: 100%">
<el-table-column
label="Id"
prop="id">
</el-table-column>
<el-table-column
label="Tc"
prop="tc">
</el-table-column>
<el-table-column
align="right">
<template slot="header" slot-scope="scope">
<el-input
v-model="search"
size="mini"
placeholder="Type to search"/>
</template>
</el-table-column>
</el-table>
<div class="filter-container">
<el-input placeholder="TC arama" v-model="search" style="width:
200px;" class="filter-item"/>
</div>
<el-table
:data="tableData.filter(data => !search ||
data.tc.toLowerCase().includes(search.toLowerCase()))"
border
fit
highlight-current-row
style="width: 100%;">
<el-table-column label="ID" prop="id" width="65"/>
<el-table-column label="TC" prop="tc" min-width="110px"/>
</el-table>
</template>
</div>
var Main =
data()
return
tableData: [
id: 1,
tc: "1233",
,
id: 1,
tc: "234",
],
search: '',
,
methods:
handleEdit(index, row)
console.log(index, row);
,
handleDelete(index, row)
console.log(index, row);
,
var Ctor = Vue.extend(Main)
new Ctor().$mount('#app')
add a comment |
There are several error in your code please refer this code.
fiddle - https://jsfiddle.net/9px5sba7/
<script src="//unpkg.com/vue/dist/vue.js"></script>
<script src="//unpkg.com/element-ui@2.6.1/lib/index.js"></script>
<div id="app">
<template>
<el-table
:data="tableData.filter(data => !search || data.tc.toLowerCase().includes(search.toLowerCase()))" border
fit
highlight-current-row
style="width: 100%">
<el-table-column
label="Id"
prop="id">
</el-table-column>
<el-table-column
label="Tc"
prop="tc">
</el-table-column>
<el-table-column
align="right">
<template slot="header" slot-scope="scope">
<el-input
v-model="search"
size="mini"
placeholder="Type to search"/>
</template>
</el-table-column>
</el-table>
<div class="filter-container">
<el-input placeholder="TC arama" v-model="search" style="width:
200px;" class="filter-item"/>
</div>
<el-table
:data="tableData.filter(data => !search ||
data.tc.toLowerCase().includes(search.toLowerCase()))"
border
fit
highlight-current-row
style="width: 100%;">
<el-table-column label="ID" prop="id" width="65"/>
<el-table-column label="TC" prop="tc" min-width="110px"/>
</el-table>
</template>
</div>
var Main =
data()
return
tableData: [
id: 1,
tc: "1233",
,
id: 1,
tc: "234",
],
search: '',
,
methods:
handleEdit(index, row)
console.log(index, row);
,
handleDelete(index, row)
console.log(index, row);
,
var Ctor = Vue.extend(Main)
new Ctor().$mount('#app')
There are several error in your code please refer this code.
fiddle - https://jsfiddle.net/9px5sba7/
<script src="//unpkg.com/vue/dist/vue.js"></script>
<script src="//unpkg.com/element-ui@2.6.1/lib/index.js"></script>
<div id="app">
<template>
<el-table
:data="tableData.filter(data => !search || data.tc.toLowerCase().includes(search.toLowerCase()))" border
fit
highlight-current-row
style="width: 100%">
<el-table-column
label="Id"
prop="id">
</el-table-column>
<el-table-column
label="Tc"
prop="tc">
</el-table-column>
<el-table-column
align="right">
<template slot="header" slot-scope="scope">
<el-input
v-model="search"
size="mini"
placeholder="Type to search"/>
</template>
</el-table-column>
</el-table>
<div class="filter-container">
<el-input placeholder="TC arama" v-model="search" style="width:
200px;" class="filter-item"/>
</div>
<el-table
:data="tableData.filter(data => !search ||
data.tc.toLowerCase().includes(search.toLowerCase()))"
border
fit
highlight-current-row
style="width: 100%;">
<el-table-column label="ID" prop="id" width="65"/>
<el-table-column label="TC" prop="tc" min-width="110px"/>
</el-table>
</template>
</div>
var Main =
data()
return
tableData: [
id: 1,
tc: "1233",
,
id: 1,
tc: "234",
],
search: '',
,
methods:
handleEdit(index, row)
console.log(index, row);
,
handleDelete(index, row)
console.log(index, row);
,
var Ctor = Vue.extend(Main)
new Ctor().$mount('#app')
answered Mar 7 at 12:21
Patel PratikPatel Pratik
35618
35618
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55038743%2fvuejs-search-filter-typeerror-cannot-read-property-filter-of-null%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown