F
Filamentβ€’14mo ago
sadiqgoni13

Repeater based on user input

I have this column
subdivision
subdivision
and a repeater such that when the user input maybe 3 in subdivision input then the repeater should not exceed 3 repeater
4 Replies
Vp
Vpβ€’14mo ago
When the user type subdicision you set default base on the input.. and also suggest to remove delete/add-more etc
sadiqgoni13
sadiqgoni13OPβ€’14mo ago
Wow never knew this was inside the docs πŸ™ƒ Thankyou
sadiqgoni13
sadiqgoni13OPβ€’14mo ago
Please how do i make it get the 'subdivision' number since this is the default
->defaultItems(3)
->defaultItems(3)
Please do anyone know the solution to this great i actually solved it by removing the
defaultItems()
defaultItems()
and make my subdivision to update
->reactive()
->afterStateUpdated(function (
$set, $state) {
$set('allocation', array_fill(0, $state ?: 0, [
'name' => null,
'phone' => null,
'allocation_number' => null,
'price' => null,
]));
})
->label("Number of Subdivisions")
->reactive()
->afterStateUpdated(function (
$set, $state) {
$set('allocation', array_fill(0, $state ?: 0, [
'name' => null,
'phone' => null,
'allocation_number' => null,
'price' => null,
]));
})
->label("Number of Subdivisions")
Want results from more Discord servers?
Add your server