Closed SturmB closed 2 years ago
I just realized my faux pas. I didn't take into account $options
' "start" value.
Here's the correct mount()
method, along with the actual session data that I intend to use:
public function mount(Request $request)
{
$armorAndTiers = $request
->session()
->get("armors.{$this->armorId}", ["minTier" => 1, "maxTier" => 4]);
$this->options["start"] = array_values($armorAndTiers);
$this->range = [
"min" => strval($armorAndTiers["minTier"]),
"max" => strval($armorAndTiers["maxTier"]),
];
}
I've mostly gotten the hang of working with this component. However, one problem I'm now running into is setting the slider handles to specific values in the Livewire component's
mount()
method. I attempt to set it to specific values; however, the handles on the slider remain at their values beforehand.Here's the class portion of the component:
And here's the view portion:
The handles after a refresh: