protonemedia / inertiajs-tables-laravel-query-builder

Inertia.js Tables for Laravel Query Builder
https://protone.media/en/blog/introducing-inertiajs-tables-a-datatables-like-package-for-laravel-query-builder
MIT License
435 stars 123 forks source link

Reset button not working when global search is in slots #101

Closed grafxflow closed 1 year ago

grafxflow commented 1 year ago

When I use the global search as a slot the reset button doesn't clear the global search slot input. Yet when using the global search on the table by default it does.

The only solution that gets close is below but this causes the input value to disappear for a split second while it refreshes the value from the url.

<template>
  <Table>
    <template v-slot:tableGlobalSearch="slotProps">
      <input
        placeholder="Custom Global Search Component..."
        @input="slotProps.onChange($event.target.value)"
        :value="slotProps.value"
      />
    </template>
  </Table>
</template>
grafxflow commented 1 year ago

Is anybody else having the same issue?

darkons commented 1 year ago

Related #97

grafxflow commented 1 year ago

This isn't sorting the issue. Do I also need to move the reset button to a slot as well as the global search?