R
R
reactreact2015-12-10 14:25:02
JavaScript
reactreact, 2015-12-10 14:25:02

How to remove data from a page (meteor)?

I display the data in the table like this

<table>
        <tr>
            <th>Id</th>
            <th>Name</th>
            <th>Surname</th>
        </tr>
        {{#each getPeople}}
            <tr class="{{_id}}">
                <td>{{_id}}</td>
                <td>{{name}}</td>
                <td>{{surname}}</td>
            </tr>
        {{/each}}
    </table>

There is also a function to remove a specific user from mongo. So, if you click on the page to "delete" a specific user, then he will be deleted from the database, but not from the page, he will disappear from the page only after a reboot. How to make sure that data is deleted from the database and from the page at the same time without reloading the page?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Komarov, 2015-12-10
@Nukk

Show your getPeople function and the one that removes the user from the database

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question