vue-strap icon indicating copy to clipboard operation
vue-strap copied to clipboard

Prop being mutated and unresolved directive el

Open joshharington opened this issue 7 years ago • 2 comments

I am trying to use the accordion component. It is working for the most part but throwing tons of errors.

It is saying that it is mutating a property isOpen (I don't have any props called isOpen). And: Failed to resolve directive: el

What do I do from here?

screen shot 2017-05-18 at 11 25 52 pm

joshharington avatar May 18 '17 21:05 joshharington

Having similiar issue!

When showing accordion gives error:

app.js:15573 [Vue warn]: Failed to resolve directive: el

(found in <Anonymous>)

When clicking on accordion headers gives error:

[Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value. Prop being mutated: "isOpen"

found in

---> <Panel>
       <Accordion>
         <Modal>
           <UsersEdit> at [hidden]\UsersEdit.vue
             <App> at [hidden]\App.vue
               <Root>

Here's my code, its accordion inside modal:

		<!-- User service log modal -->
		<modal :show.sync="showLogsModal" large effect="zoom">
			<div slot="modal-header" class="modal-header">
				<h4 class="modal-title">Logs</h4>
			</div>
			<div slot="modal-body" class="modal-body">
				<accordion :one-at-atime="true" type="default" class="accordion-table">
					<panel :header="log.title" v-for="(log, key) in groupedLogs" :key="key" :is-open="key === 0">
						<table class="table table-striped">
							<thead>
								<tr>
									<th>Time</th>
									<th>Event</th>
								</tr>
							</thead>
							<tbody>
								<tr v-for="l in log.logs" :key="l.id">
									<td>{{ l.time }}</td>
									<td>{{ l.event }}</td>
								</tr>
							</tbody>
						</table>
					</panel>
				</accordion>
			</div>
			<div slot="modal-footer" class="modal-footer">
				<button type="button" class="btn btn-default" @click="toggleLogsModal">Close</button>
			</div>
		</modal>

ghost avatar Jul 06 '17 09:07 ghost

@yuche any resolution to this. Have the same issue

abishekrsrikaanth avatar Aug 28 '17 17:08 abishekrsrikaanth