mirror of
https://github.com/ash-project/ash_phoenix.git
synced 2024-09-19 23:02:48 +12:00
improvement: Remove domain opt from AshPhoenix.LiveView (#167)
This commit is contained in:
parent
b8c2d4034e
commit
94e17780ff
1 changed files with 1 additions and 10 deletions
|
@ -38,11 +38,6 @@ defmodule AshPhoenix.LiveView do
|
|||
type: :any,
|
||||
doc: "Results to use instead of running the query immediately."
|
||||
],
|
||||
domain: [
|
||||
type: :atom,
|
||||
doc:
|
||||
"For paginated views, in order to use `change_page/3`, you must set the Domain to use for pagination"
|
||||
],
|
||||
refetch_interval: [
|
||||
type: :non_neg_integer,
|
||||
doc: "An interval (in ms) to periodically refetch the query"
|
||||
|
@ -219,11 +214,7 @@ defmodule AshPhoenix.LiveView do
|
|||
data -> data
|
||||
end
|
||||
|
||||
unless config.opts[:domain] do
|
||||
raise "Must set domain to use change_page/3"
|
||||
end
|
||||
|
||||
new_result = config.opts[:domain].page!(current_page, target)
|
||||
new_result = Ash.page!(current_page, target)
|
||||
{_query, rerun_opts} = new_result.rerun
|
||||
new_page_opts = Keyword.merge(config.opts[:page] || [], rerun_opts[:page])
|
||||
new_opts = Keyword.put(config.opts, :page, new_page_opts)
|
||||
|
|
Loading…
Reference in a new issue