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
Vp17mo ago
When the user type subdicision you set default base on the input.. and also suggest to remove delete/add-more etc
sadiqgoni13
sadiqgoni13OP17mo ago
Wow never knew this was inside the docs 🙃 Thankyou
sadiqgoni13
sadiqgoni13OP16mo 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")

Did you find this page helpful?